diff --git a/Control/AthCUDA/AthCUDACore/src/Memory.cu b/Control/AthCUDA/AthCUDACore/src/Memory.cu index 94305f8b3377e7de169d7c98c6957cb3d2b2bbd2..476008d37593b692a94a5d0ce067ea7d4355c341 100644 --- a/Control/AthCUDA/AthCUDACore/src/Memory.cu +++ b/Control/AthCUDA/AthCUDACore/src/Memory.cu @@ -76,11 +76,7 @@ namespace AthCUDA { // If a device is available, then free up the memory using CUDA. if( Info::instance().nDevices() != 0 ) { - taskArena().enqueue( ::DeviceDeleterTask( ptr ) -#if __TBB_TASK_PRIORITY - , tbb::priority_normal -#endif // __TBB_TASK_PRIORITY - ); + taskArena().enqueue( ::DeviceDeleterTask( ptr ) ); return; } @@ -98,11 +94,7 @@ namespace AthCUDA { // If a device is available, then free up the memory using CUDA. if( Info::instance().nDevices() != 0 ) { - taskArena().enqueue( ::DeviceDeleterTask( ptr ) -#if __TBB_TASK_PRIORITY - , tbb::priority_normal -#endif // __TBB_TASK_PRIORITY - ); + taskArena().enqueue( ::DeviceDeleterTask( ptr ) ); return; } @@ -120,11 +112,7 @@ namespace AthCUDA { // If a device is available, then free up the memory using CUDA. if( Info::instance().nDevices() != 0 ) { - taskArena().enqueue( ::HostDeleterTask( ptr ) -#if __TBB_TASK_PRIORITY - , tbb::priority_normal -#endif // __TBB_TASK_PRIORITY - ); + taskArena().enqueue( ::HostDeleterTask( ptr ) ); return; } diff --git a/Control/AthCUDA/AthCUDAKernel/AthCUDAKernel/ArrayKernelTaskImpl.cuh b/Control/AthCUDA/AthCUDAKernel/AthCUDAKernel/ArrayKernelTaskImpl.cuh index 5ff7c50d3aec6ca625579f7b76db61083b0e8e79..234c83fd70a28bcb43ae57c41371801d0a3fe587 100644 --- a/Control/AthCUDA/AthCUDAKernel/AthCUDAKernel/ArrayKernelTaskImpl.cuh +++ b/Control/AthCUDA/AthCUDAKernel/AthCUDAKernel/ArrayKernelTaskImpl.cuh @@ -20,11 +20,11 @@ /// Helper macro for status code checks inside of these functions #define AKT_CHECK( EXP ) \ do { \ - const int _result = EXP; \ - if( _result != 0 ) { \ + const int exp_result = EXP; \ + if( exp_result != 0 ) { \ std::cerr << __FILE__ << ":" << __LINE__ \ << " Failed to execute: " << #EXP << std::endl; \ - return _result; \ + return exp_result; \ } \ } while( false ) @@ -385,11 +385,23 @@ namespace { "Only trivial arrays are supported" ); public: /// Operator scheduling the host->device copy of one array - int operator()( cudaStream_t stream, std::size_t arraySizes, - typename ArrayKernelTaskHostVariables< ARGS... >::type& - hostArgs, - typename ArrayKernelTaskDeviceVariables< ARGS... >::type& - deviceArgs ) { + int operator()( cudaStream_t +#ifdef __CUDACC__ + stream +#endif // __CUDACC__ + , std::size_t +#ifdef __CUDACC__ + arraySizes +#endif // __CUDACC__ + , typename ArrayKernelTaskHostVariables< ARGS... >::type& +#ifdef __CUDACC__ + hostArgs +#endif // __CUDACC__ + , typename ArrayKernelTaskDeviceVariables< ARGS... >::type& +#ifdef __CUDACC__ + deviceArgs +#endif // __CUDACC__ + ) { // Schedule the H->D copy. CUDA_EXP_CHECK( cudaMemcpyAsync( std::get< Index >( deviceArgs ).get(), std::get< Index >( hostArgs ).get(), @@ -502,11 +514,23 @@ namespace { "Only trivial arrays are supported" ); public: /// Operator scheduling the device->host copy of one array - int operator()( cudaStream_t stream, std::size_t arraySizes, - typename ArrayKernelTaskDeviceVariables< ARGS... >::type& - deviceObjs, - typename ArrayKernelTaskHostVariables< ARGS... >::type& - hostObjs ) { + int operator()( cudaStream_t +#ifdef __CUDACC__ + stream +#endif // __CUDACC__ + , std::size_t +#ifdef __CUDACC__ + arraySizes +#endif // __CUDACC__ + , typename ArrayKernelTaskDeviceVariables< ARGS... >::type& +#ifdef __CUDACC__ + deviceObjs +#endif // __CUDACC__ + , typename ArrayKernelTaskHostVariables< ARGS... >::type& +#ifdef __CUDACC__ + hostObjs +#endif // __CUDACC__ + ) { // Schedule the D->H copy. CUDA_EXP_CHECK( cudaMemcpyAsync( std::get< Index >( hostObjs ).get(), std::get< Index >( deviceObjs ).get(), @@ -801,8 +825,16 @@ namespace { /// Function called at the end of the recursive function calls. This /// is the function that actually does something. template< typename... ARGS1 > - static int execute( cudaStream_t stream, std::size_t arraySizes, - const std::tuple<>&, ARGS1... args ) { + static int execute( cudaStream_t +#ifdef __CUDACC__ + stream +#endif // __CUDACC__ + , std::size_t arraySizes, const std::tuple<>&, + ARGS1... +#ifdef __CUDACC__ + args +#endif // __CUDACC__ + ) { // If the arrays are empty, return right away. if( arraySizes == 0 ) { diff --git a/Control/AthCUDA/AthCUDAServices/src/KernelRunnerSvcImpl.cu b/Control/AthCUDA/AthCUDAServices/src/KernelRunnerSvcImpl.cu index d8e6335ead307f273985ed6c6b5add2fe2253e3f..909feb7db78248c180e421229fbc5da8d937eeff 100644 --- a/Control/AthCUDA/AthCUDAServices/src/KernelRunnerSvcImpl.cu +++ b/Control/AthCUDA/AthCUDAServices/src/KernelRunnerSvcImpl.cu @@ -114,11 +114,7 @@ namespace AthCUDA { // kernel. taskArena().enqueue( ::KernelSchedulerTask( m_callback, std::move( task ), - *this ) -#if __TBB_TASK_PRIORITY - , tbb::priority_normal -#endif // __TBB_TASK_PRIORITY - ); + *this ) ); // Return gracefully. return; diff --git a/Control/StoreGate/src/SGImplSvc.cxx b/Control/StoreGate/src/SGImplSvc.cxx index 502702c18f911116616eac11a4dabdfb8c3c7d7f..d950f8257e0f4151b0b5add0b603cdf86569ee2b 100644 --- a/Control/StoreGate/src/SGImplSvc.cxx +++ b/Control/StoreGate/src/SGImplSvc.cxx @@ -796,12 +796,17 @@ SGImplSvc::proxy(const CLID& id) const DataProxy* SGImplSvc::proxy(const CLID& id, bool checkValid) const { - lock_t lock (m_mutex); - DataProxy* dp = m_pStore->proxy(id); - if (0 == dp && 0 != m_pPPS) { - dp = m_pPPS->retrieveProxy(id, string("DEFAULT"), *m_pStore); + DataProxy* dp = nullptr; + { + lock_t lock (m_mutex); + dp = m_pStore->proxy(id); + if (0 == dp && 0 != m_pPPS) { + dp = m_pPPS->retrieveProxy(id, string("DEFAULT"), *m_pStore); + } } /// Check if it is valid + // Be sure to release the lock before this. + // isValid() may call back to the store, so we could otherwise deadlock.. if (checkValid && 0 != dp) { // FIXME: For keyless retrieve, this checks only the first instance // of the CLID in store. If that happens to be invalid, but the second @@ -820,11 +825,16 @@ SGImplSvc::proxy(const CLID& id, const string& key) const DataProxy* SGImplSvc::proxy(const CLID& id, const string& key, bool checkValid) const { - lock_t lock (m_mutex); - DataProxy* dp = m_pStore->proxy(id, key); - if (0 == dp && 0 != m_pPPS) { - dp = m_pPPS->retrieveProxy(id, key, *m_pStore); + DataProxy* dp = nullptr; + { + lock_t lock (m_mutex); + dp = m_pStore->proxy(id, key); + if (0 == dp && 0 != m_pPPS) { + dp = m_pPPS->retrieveProxy(id, key, *m_pStore); + } } + // Be sure to release the lock before this. + // isValid() may call back to the store, so we could otherwise deadlock.. if (checkValid && 0 != dp && !(dp->isValid())) dp = 0; return dp; } diff --git a/Event/xAOD/xAODTruthCnv/src/HepMCTruthReader.cxx b/Event/xAOD/xAODTruthCnv/src/HepMCTruthReader.cxx index f0ddf24c69f14bbb22d9eee138786cdeb9d4625d..da157b9d0f6e59958da465a8102469017c0733d9 100644 --- a/Event/xAOD/xAODTruthCnv/src/HepMCTruthReader.cxx +++ b/Event/xAOD/xAODTruthCnv/src/HepMCTruthReader.cxx @@ -95,7 +95,7 @@ void HepMCTruthReader::printEvent(const HepMC::GenEvent* event) { // Print method for vertex - mimics the HepMC dump. // Particle print method called within here -void HepMCTruthReader::printVertex(const HepMC::GenVertexPtr vertex) { +void HepMCTruthReader::printVertex(HepMC::ConstGenVertexPtr vertex) { std::ios::fmtflags f( cout.flags() ); cout << "GenVertex (" << vertex << "):"; if (HepMC::barcode(vertex) != 0) { @@ -221,7 +221,7 @@ void HepMCTruthReader::printVertex(const HepMC::GenVertexPtr vertex) { // Print method for particle - mimics the HepMC dump. -void HepMCTruthReader::printParticle(const HepMC::GenParticlePtr particle) { +void HepMCTruthReader::printParticle(HepMC::ConstGenParticlePtr particle) { std::ios::fmtflags f( cout.flags() ); cout << " "; cout.width(9); diff --git a/Event/xAOD/xAODTruthCnv/src/HepMCTruthReader.h b/Event/xAOD/xAODTruthCnv/src/HepMCTruthReader.h index 9d835d2015d3b748cdf237ab5fb221fe8494a8cf..b47419c07d523a3e7dd1bd6038255688fa7bfbb7 100644 --- a/Event/xAOD/xAODTruthCnv/src/HepMCTruthReader.h +++ b/Event/xAOD/xAODTruthCnv/src/HepMCTruthReader.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef HEPMCTRUTHREADER_H @@ -33,8 +33,8 @@ private: std::string m_hepMCContainerName; void printEvent(const HepMC::GenEvent*); - void printVertex(const HepMC::GenVertexPtr); - void printParticle(const HepMC::GenParticlePtr); + void printVertex(HepMC::ConstGenVertexPtr); + void printParticle(HepMC::ConstGenParticlePtr); }; // class HepMCTruthReader diff --git a/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.cxx b/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.cxx index a651259d1591ac5a93e84bec59e67bfee291e39e..8cf4b77177b417d7f6118a0e28f76ff6d588b13d 100644 --- a/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.cxx +++ b/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.cxx @@ -402,7 +402,7 @@ namespace xAODMaker { // A helper to set up a TruthVertex (without filling the ELs) - void xAODTruthCnvAlg::fillVertex(xAOD::TruthVertex* tv, const HepMC::GenVertexPtr gv) { + void xAODTruthCnvAlg::fillVertex(xAOD::TruthVertex* tv, HepMC::ConstGenVertexPtr gv) { tv->setId(gv->id()); tv->setBarcode(HepMC::barcode(gv)); @@ -419,7 +419,7 @@ namespace xAODMaker { // A helper to set up a TruthParticle (without filling the ELs) - void xAODTruthCnvAlg::fillParticle(xAOD::TruthParticle* tp, const HepMC::GenParticlePtr gp) { + void xAODTruthCnvAlg::fillParticle(xAOD::TruthParticle* tp, HepMC::ConstGenParticlePtr gp) { tp->setPdgId(gp->pdg_id()); tp->setBarcode(HepMC::barcode(gp)); tp->setStatus(gp->status()); diff --git a/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.h b/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.h index 7dbd7ab41667eb48444a5b64a6b73fc413ab5ffd..eff80d6621f0cc775fb49bc65ca90ce3e382d59b 100644 --- a/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.h +++ b/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.h @@ -103,11 +103,11 @@ namespace xAODMaker { std::vector<ElementLink<xAOD::TruthParticleContainer> > outgoingEL; }; /// Convenience handle for a map of vtx ptrs -> connected particles - typedef std::map<const HepMC::GenVertexPtr, VertexParticles> VertexMap; + typedef std::map<HepMC::ConstGenVertexPtr, VertexParticles> VertexMap; /// These functions do not set up ELs, just the other variables - static void fillVertex(xAOD::TruthVertex *tv, const HepMC::GenVertexPtr gv); - static void fillParticle(xAOD::TruthParticle *tp, const HepMC::GenParticlePtr gp); + static void fillVertex(xAOD::TruthVertex *tv, HepMC::ConstGenVertexPtr gv); + static void fillParticle(xAOD::TruthParticle *tp, HepMC::ConstGenParticlePtr gp); /// The key of the input AOD truth container SG::ReadHandleKey<McEventCollection> m_aodContainerKey{ diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenParticle_fwd.h b/Generators/AtlasHepMC/AtlasHepMC/GenParticle_fwd.h index 06e26fead4d681b2e6fb979afc8eab42ac9952d7..6a6057016f836cd370c0f2b9b325aacc71600d6f 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/GenParticle_fwd.h +++ b/Generators/AtlasHepMC/AtlasHepMC/GenParticle_fwd.h @@ -13,6 +13,7 @@ typedef HepMC3::ConstGenParticlePtr ConstGenParticlePtr; namespace HepMC { class GenParticle; typedef GenParticle* GenParticlePtr; +typedef const GenParticle* ConstGenParticlePtr; } #endif #endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h b/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h index 501c2b58832f86546fae45b4a96cdabb3d72bb2e..25987601a67f89b2404bc858c5aacd2214677f1b 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h +++ b/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h @@ -41,12 +41,13 @@ inline void* raw_pointer(GenVertexPtr p){ return p.get();} #include "HepMC/GenVertex.h" namespace HepMC { typedef HepMC::GenVertex* GenVertexPtr; -typedef HepMC::GenVertex* const ConstGenVertexPtr; +typedef const HepMC::GenVertex* ConstGenVertexPtr; inline GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos = HepMC::FourVector(0.0,0.0,0.0,0.0), const int i=0) { return new HepMC::GenVertex(pos,i); } inline int barcode(ConstGenVertexPtr p){ return p->barcode();} inline void* raw_pointer(GenVertexPtr p){ return p;} +inline const void* raw_pointer(ConstGenVertexPtr p){ return p;} inline std::ostream& operator<<( std::ostream& os, const GenVertex* v ) { if (v) return os<<(*v); else return os;} } #endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenVertex_fwd.h b/Generators/AtlasHepMC/AtlasHepMC/GenVertex_fwd.h index 680b4f2d6303d1b1757d0880d630288bad920d58..e6396810d2bcc13c158f31a6d0a29e58284d48b6 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/GenVertex_fwd.h +++ b/Generators/AtlasHepMC/AtlasHepMC/GenVertex_fwd.h @@ -13,6 +13,7 @@ typedef HepMC3::ConstGenVertexPtr ConstGenVertexPtr; namespace HepMC { class GenVertex; typedef HepMC::GenVertex* GenVertexPtr; +typedef const HepMC::GenVertex* ConstGenVertexPtr; } #endif #endif diff --git a/Generators/TruthUtils/TruthUtils/HepMCHelpers.h b/Generators/TruthUtils/TruthUtils/HepMCHelpers.h index bca1fb0c476ad03106ccef3421d36a70c6bce090..bc50359760499eb2c6d8430e1c1114a9e3f1dd72 100644 --- a/Generators/TruthUtils/TruthUtils/HepMCHelpers.h +++ b/Generators/TruthUtils/TruthUtils/HepMCHelpers.h @@ -30,7 +30,7 @@ namespace MC { /// The receipe for this is barcode < 200k and status = 1. Gen-stable particles decayed by /// G4 are not set to have status = 2 in ATLAS, but simply have more status = 1 children, /// with barcodes > 200k. - inline bool isGenStable(const HepMC::GenParticle* p) { + inline bool isGenStable(HepMC::ConstGenParticlePtr p) { return isGenStable(p->status(), p->barcode()); } @@ -39,7 +39,7 @@ namespace MC { /// @brief Identify if the particle is considered stable at the post-detector-sim stage - inline bool isSimStable(const HepMC::GenParticle* p) { + inline bool isSimStable(HepMC::ConstGenParticlePtr p) { if (p->status() != 1) return false; if (isGenStable(p)) return p->end_vertex() == NULL; return true; @@ -48,25 +48,25 @@ namespace MC { /// @brief Identify if the particle is considered stable at the post-detector-sim stage /// @todo I'm sure this shouldn't be exactly the same as isGenStable, but it is... /// @deprecated Use isSimulStable: this function _will_ be removed! - inline bool isGenSimulStable(const HepMC::GenParticle* p) { + inline bool isGenSimulStable(HepMC::ConstGenParticlePtr p) { return isSimStable(p); } /// @brief Identify if the particle would not interact with the detector, i.e. not a neutrino or WIMP - inline bool isNonInteracting(const HepMC::GenParticle* p) { + inline bool isNonInteracting(HepMC::ConstGenParticlePtr p) { return MC::isNonInteracting(p->pdg_id()); //< From TruthUtils/PIDHelpers.h } /// @brief Identify if the particle could interact with the detector during the simulation, e.g. not a neutrino or WIMP - inline bool isSimInteracting(const HepMC::GenParticle* p) { + inline bool isSimInteracting(HepMC::ConstGenParticlePtr p) { if (! MC::isGenStable(p)) return false; //skip particles which the simulation would not see return !MC::isNonInteracting(p); } /// @brief Oddly-named alias for isSimInteracting /// @deprecated Use isSimInteracting: this function _will_ be removed! - inline bool isGenInteracting(const HepMC::GenParticle* p) { + inline bool isGenInteracting(HepMC::ConstGenParticlePtr p) { return isSimInteracting(p); } diff --git a/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.cxx b/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.cxx index 20c566df027c05f0c40c032be6a2d6f6a33676e4..cd56cc19a0e912eec1b027e482e1e0d141400714 100644 --- a/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.cxx +++ b/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.cxx @@ -16,6 +16,9 @@ // Athena +// STL includes +#include <algorithm> // std::find + HltROBDataProviderSvc::HltROBDataProviderSvc(const std::string& name, ISvcLocator* pSvcLocator) : base_class(name, pSvcLocator) { @@ -338,7 +341,7 @@ void HltROBDataProviderSvc::getROBData(const EventContext& context, // check input ROB list against cache eventCache_checkRobListToCache(cache, robIds, robFragments, robIds_missing) ; - // missing ROB fragments from the DCM and add them to the cache + // no missing ROB fragments, return the found ROB fragments if (robIds_missing.size() == 0) { ATH_MSG_DEBUG( __FUNCTION__ << ": All requested ROB Ids were found in the cache. "); return; @@ -552,6 +555,13 @@ void HltROBDataProviderSvc::eventCache_checkRobListToCache(EventCache* cache, co for (uint32_t id : robIds_toCheck) { + // check for duplicate IDs on the list of missing ROBs + std::vector<uint32_t>::iterator missing_it = std::find(robIds_missing.begin(), robIds_missing.end(), id); + if (missing_it != robIds_missing.end()) { + ATH_MSG_VERBOSE(__FUNCTION__ << " ROB Id : 0x" << MSG::hex << id << MSG::dec <<" is already on the list of missing IDs."); + continue; + } + // check if ROB is already in cache ROBMAP::const_iterator map_it = cache->robmap.find(id); if (map_it != cache->robmap.end()) { diff --git a/InnerDetector/InDetConditions/PixelCoralClientUtils/PixelCoralClientUtils/SpecialPixelMap.hh b/InnerDetector/InDetConditions/PixelCoralClientUtils/PixelCoralClientUtils/SpecialPixelMap.hh index 31ef77c10a0014c65f7f95347221193d80d5edbd..4f3dfc396ebfd683dd718a4f5866cdd0d2ad8b19 100644 --- a/InnerDetector/InDetConditions/PixelCoralClientUtils/PixelCoralClientUtils/SpecialPixelMap.hh +++ b/InnerDetector/InDetConditions/PixelCoralClientUtils/PixelCoralClientUtils/SpecialPixelMap.hh @@ -33,9 +33,9 @@ namespace PixelCoralClientUtils { //static unsigned int columnsPerFEI4 = 80; // number of columns per FEI4 //static unsigned int rowsPerFEI4 = 336; // number of rows per FEI4 const unsigned int nmtype(5); - static unsigned int columnsPerFEIX[5]={18,80,132,80,132}; // number of columns per FEI3, 4, 50, 51, 52 - static unsigned int rowsPerFEIX[5]={164, 336, 672, 339, 678}; // number of rows per FEI3, 4, 50, 51, 52 - static unsigned int rowsRdoPerFEIX[5]={160, 336, 672, 336, 672}; // number of rows readout per FEI3, 4, 50, 51, 52 + static const unsigned int columnsPerFEIX[5]={18,80,132,80,132}; // number of columns per FEI3, 4, 50, 51, 52 + static const unsigned int rowsPerFEIX[5]={164, 336, 672, 339, 678}; // number of rows per FEI3, 4, 50, 51, 52 + static const unsigned int rowsRdoPerFEIX[5]={160, 336, 672, 336, 672}; // number of rows readout per FEI3, 4, 50, 51, 52 class ModuleSpecialPixelMap; @@ -46,7 +46,7 @@ class ModuleSpecialPixelMap; its IdentifierHash. */ -class ATLAS_NOT_THREAD_SAFE DetectorSpecialPixelMap : public std::vector<ModuleSpecialPixelMap*>{ // Thread unsafe ModuleSpecialPixelMap class is used. +class DetectorSpecialPixelMap : public std::vector<ModuleSpecialPixelMap*>{ public: DetectorSpecialPixelMap(); @@ -100,7 +100,7 @@ class ATLAS_NOT_THREAD_SAFE DetectorSpecialPixelMap : public std::vector<ModuleS **/ -class ATLAS_NOT_THREAD_SAFE ModuleSpecialPixelMap : private std::map<unsigned int, unsigned int>{ // static member variable is used. +class ModuleSpecialPixelMap : private std::map<unsigned int, unsigned int>{ public: friend class ::ModuleSpecialPixelMap; @@ -196,9 +196,6 @@ class ATLAS_NOT_THREAD_SAFE ModuleSpecialPixelMap : private std::map<unsigned in void setNeighbourFlags(); //!< fill the information about special neighbouring pixels, bits 25 - 28 - static bool m_markSpecialRegions; - //!< switch for automatic identification of special regions - typedef std::map<unsigned int, unsigned int>::iterator iterator; //!< std::map iterators are forwarded for access to all special pixels on a module //!< These iterate *only* over the special pixels that are *not* in a special region, one has to check special regions independently diff --git a/InnerDetector/InDetConditions/PixelCoralClientUtils/src/SpecialPixelMap.cc b/InnerDetector/InDetConditions/PixelCoralClientUtils/src/SpecialPixelMap.cc index 5803c26902ac0bb168bc78e2f75e08ae0b785475..212c6ecdcca3a7d5b9184d19c88657a14601dfe7 100644 --- a/InnerDetector/InDetConditions/PixelCoralClientUtils/src/SpecialPixelMap.cc +++ b/InnerDetector/InDetConditions/PixelCoralClientUtils/src/SpecialPixelMap.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ //**************************************************************************** @@ -177,9 +177,6 @@ ModuleSpecialPixelMap::ModuleSpecialPixelMap(const char* filename, unsigned int } } - if(m_markSpecialRegions){ - markSpecialRegions(); - } setNeighbourFlags(); } @@ -192,9 +189,6 @@ ModuleSpecialPixelMap::ModuleSpecialPixelMap(const std::string& clob, unsigned i std::cout << "In ModuleSpecialPixelMap::ModuleSpecialPixelMap(const std::string&) :" << " Construction from clob failed" << std::endl; } - if(m_markSpecialRegions){ - markSpecialRegions(); - } } @@ -207,9 +201,6 @@ ModuleSpecialPixelMap::ModuleSpecialPixelMap(const coral::Blob& blob, unsigned i std::cout << "In ModuleSpecialPixelMap::ModuleSpecialPixelMap(const coral::Blob&) :" << " Construction from blob failed" << std::endl; } - if(m_markSpecialRegions){ - markSpecialRegions(); - } } ModuleSpecialPixelMap::ModuleSpecialPixelMap(const std::map<unsigned int, unsigned int>& pixels, @@ -223,9 +214,6 @@ ModuleSpecialPixelMap::ModuleSpecialPixelMap(const std::map<unsigned int, unsign m_chip_status(chip_status), m_column_pair_status(column_pair_status) { - if(m_markSpecialRegions){ - markSpecialRegions(); - } } ModuleSpecialPixelMap::~ModuleSpecialPixelMap(){} @@ -1678,7 +1666,6 @@ void ModuleSpecialPixelMap::setNeighbourFlags(){ } } -bool ModuleSpecialPixelMap::m_markSpecialRegions = false; ModuleSpecialPixelMap::size_type ModuleSpecialPixelMap::size() const{ return std::map<unsigned int, unsigned int>::size(); diff --git a/InnerDetector/InDetMonitoring/TRT_Monitoring/src/TRT_Monitoring_Tool.cxx b/InnerDetector/InDetMonitoring/TRT_Monitoring/src/TRT_Monitoring_Tool.cxx index 72f743fe56e23a3c2f2493921886642fc4f4ee0a..6f733650688d3edf1b17db3b57da510fb0e47af6 100644 --- a/InnerDetector/InDetMonitoring/TRT_Monitoring/src/TRT_Monitoring_Tool.cxx +++ b/InnerDetector/InDetMonitoring/TRT_Monitoring/src/TRT_Monitoring_Tool.cxx @@ -2452,7 +2452,7 @@ StatusCode TRT_Monitoring_Tool::fillTRTTracks(const TrackCollection& trackCollec } for (; p_trk != trackCollection.end(); ++p_trk) { - const std::unique_ptr<const Trk::TrackSummary> summary(m_TrackSummaryTool->createSummary(*(*p_trk))); + std::unique_ptr<const Trk::TrackSummary> summary = m_TrackSummaryTool->summary(*(*p_trk)); int nTRTHits = summary->get(Trk::numberOfTRTHits); if (nTRTHits < m_minTRThits) continue; @@ -3580,7 +3580,7 @@ StatusCode TRT_Monitoring_Tool::fillTRTEfficiency(const TrackCollection& combTra continue; } - const std::unique_ptr<const Trk::TrackSummary> summary(m_TrackSummaryTool->createSummary(*(*track))); + std::unique_ptr<const Trk::TrackSummary> summary = m_TrackSummaryTool->summary(*(*track)); int n_trt_hits = summary->get(Trk::numberOfTRTHits); int n_sct_hits = summary->get(Trk::numberOfSCTHits); int n_pixel_hits = summary->get(Trk::numberOfPixelHits); @@ -3857,7 +3857,7 @@ StatusCode TRT_Monitoring_Tool::fillTRTHighThreshold(const TrackCollection& trac DataVector<const Trk::TrackStateOnSurface>::const_iterator TSOSItBegin = trackStates->begin(); DataVector<const Trk::TrackStateOnSurface>::const_iterator TSOSItEnd = trackStates->end(); - const std::unique_ptr<const Trk::TrackSummary> summary(m_TrackSummaryTool->createSummary(*(*p_trk))); + std::unique_ptr<const Trk::TrackSummary> summary = m_TrackSummaryTool->summary(*(*p_trk)); int trt_hits = summary->get(Trk::numberOfTRTHits); int sct_hits = summary->get(Trk::numberOfSCTHits); int pixel_hits = summary->get(Trk::numberOfPixelHits); diff --git a/LArCalorimeter/LArG4/LArG4FastSimulation/src/LArFastShower.cxx b/LArCalorimeter/LArG4/LArG4FastSimulation/src/LArFastShower.cxx index 442c6d12bd16596786bb14114b376c0e60a2807b..467d4254b10cd74c05abdd8d2ae743b760071904 100644 --- a/LArCalorimeter/LArG4/LArG4FastSimulation/src/LArFastShower.cxx +++ b/LArCalorimeter/LArG4/LArG4FastSimulation/src/LArFastShower.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "LArFastShower.h" @@ -9,6 +9,8 @@ #include "LArG4Code/EnergySpot.h" #include "AtlasHepMC/GenEvent.h" +#include "AtlasHepMC/GenParticle.h" +#include "AtlasHepMC/GenVertex.h" #include "AtlasHepMC/IO_GenEvent.h" #include <stdexcept> @@ -339,11 +341,11 @@ HepMC::GenEvent * LArFastShower::GetGenEvent(const G4FastTrack &fastTrack) // new event. Signal processing = 0, event number "next" HepMC::GenEvent* ge = new HepMC::GenEvent( 0, ++m_eventNum); // vertex. Position of the shower, time = 0 - HepMC::GenVertex* gv = new HepMC::GenVertex( + HepMC::GenVertexPtr gv = HepMC::newGenVertexPtr( HepMC::FourVector(showerPos.x(), showerPos.y(), showerPos.z(), 0) ); ge->add_vertex(gv); // particle. FourVector of the shower, pdgcode, status = 1 - HepMC::GenParticle* gp = new HepMC::GenParticle( + HepMC::GenParticlePtr gp = HepMC::newGenParticlePtr( HepMC::FourVector(showerMom.x(), showerMom.y(), showerMom.z(), energy), pdgcode, 1 ); gv->add_particle_out(gp); diff --git a/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/EtaEnergyShowerLib.h b/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/EtaEnergyShowerLib.h index 435be4b500d5ccde30493b835f3e4d8232eac5c9..a8f0f138f438071391b49902deb49bddb942f216 100644 --- a/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/EtaEnergyShowerLib.h +++ b/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/EtaEnergyShowerLib.h @@ -64,7 +64,7 @@ namespace ShowerLib { //! get average lateral spread of the showers for the given energy virtual double getContainmentR(const G4Track* track) const; //! store shower in the library - virtual bool storeShower(const HepMC::GenParticle* genParticle,const Shower* shower); + virtual bool storeShower(HepMC::ConstGenParticlePtr genParticle,const Shower* shower); //! write library to ROOT file virtual bool writeToROOT(TFile* dest); diff --git a/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/FCALDistEnergyShowerLib.h b/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/FCALDistEnergyShowerLib.h index ac9e383f38912330790628419640b5ee6e0a6fa9..694886088cbb9b42b7e24e154b2a7277593c6e6c 100644 --- a/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/FCALDistEnergyShowerLib.h +++ b/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/FCALDistEnergyShowerLib.h @@ -65,7 +65,7 @@ namespace ShowerLib { //! get average lateral spread of the showers for the given energy virtual double getContainmentR(const G4Track* track) const; //! store shower in the library - virtual bool storeShower(const HepMC::GenParticle* genParticle,const Shower* shower); + virtual bool storeShower(HepMC::ConstGenParticlePtr genParticle,const Shower* shower); //! write library to ROOT file virtual bool writeToROOT(TFile* dest); diff --git a/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/FCALDistEtaEnergyShowerLib.h b/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/FCALDistEtaEnergyShowerLib.h index c758abbb1a4623ca54a4394fdff2447538ba4943..9b387c10e8b821d0bbd9dbfe69b1d0c0d1e252b5 100644 --- a/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/FCALDistEtaEnergyShowerLib.h +++ b/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/FCALDistEtaEnergyShowerLib.h @@ -67,7 +67,7 @@ namespace ShowerLib { //! get average lateral spread of the showers for the given energy virtual double getContainmentR(const G4Track* track) const; //! store shower in the library - virtual bool storeShower(const HepMC::GenParticle* genParticle,const Shower* shower); + virtual bool storeShower(HepMC::ConstGenParticlePtr genParticle,const Shower* shower); //! write library to ROOT file virtual bool writeToROOT(TFile* dest); diff --git a/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/IShowerLib.h b/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/IShowerLib.h index 81534967b0aeecf5bd1944e93df5ac411602f469..c0a9948eeeabbaebe2ed1b3e9c471b0511b89a6b 100755 --- a/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/IShowerLib.h +++ b/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/IShowerLib.h @@ -51,7 +51,7 @@ namespace ShowerLib { //! get average lateral spread of the showers for the given energy virtual double getContainmentR(const G4Track* track) const = 0; //! store shower in the library - virtual bool storeShower(const HepMC::GenParticle* genParticle,const Shower* shower) = 0; + virtual bool storeShower(HepMC::ConstGenParticlePtr genParticle,const Shower* shower) = 0; //! write library to ROOT file virtual bool writeToROOT(TFile* dest) = 0; diff --git a/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/TestShowerLib.h b/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/TestShowerLib.h index 6c6d50ba71763292eca9f2067753d5c53e9dfa20..55fafb1875b54990209868de801bab96d260b133 100644 --- a/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/TestShowerLib.h +++ b/LArCalorimeter/LArG4/LArG4ShowerLib/LArG4ShowerLib/TestShowerLib.h @@ -52,7 +52,7 @@ namespace ShowerLib { //! get average lateral spread of the showers for the given energy virtual double getContainmentR(const G4Track* track) const; //! store shower in the library - virtual bool storeShower(const HepMC::GenParticle* genParticle,const Shower* shower); + virtual bool storeShower(HepMC::ConstGenParticlePtr genParticle,const Shower* shower); //! write library to ROOT file virtual bool writeToROOT(TFile* dest); diff --git a/LArCalorimeter/LArG4/LArG4ShowerLib/src/EtaEnergyShowerLib.cxx b/LArCalorimeter/LArG4/LArG4ShowerLib/src/EtaEnergyShowerLib.cxx index b8b78ab2092ee9403d98884a5517a73862839193..e9966a3439369d33e47ff5a4af99bd54afe68715 100644 --- a/LArCalorimeter/LArG4/LArG4ShowerLib/src/EtaEnergyShowerLib.cxx +++ b/LArCalorimeter/LArG4/LArG4ShowerLib/src/EtaEnergyShowerLib.cxx @@ -1,13 +1,13 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // this header file #include "LArG4ShowerLib/EtaEnergyShowerLib.h" -#include <HepMC/GenParticle.h> -#include <HepMC/GenVertex.h> +#include "AtlasHepMC/GenParticle.h" +#include "AtlasHepMC/GenVertex.h" #include <sstream> #include <fstream> @@ -356,7 +356,7 @@ namespace ShowerLib { return rezR/actualNumFS; //average Z size } - bool EtaEnergyShowerLib::storeShower(const HepMC::GenParticle* genParticle, const Shower* shower) + bool EtaEnergyShowerLib::storeShower(HepMC::ConstGenParticlePtr genParticle, const Shower* shower) { if (m_filled) { std::cout << "ERROR: filled" << std::endl; diff --git a/LArCalorimeter/LArG4/LArG4ShowerLib/src/FCALDistEnergyShowerLib.cxx b/LArCalorimeter/LArG4/LArG4ShowerLib/src/FCALDistEnergyShowerLib.cxx index d8d14e2933eae703676c098b526f7dbb01573330..b4b87ac9521e736298d61c6220c6b89a8540ec1f 100644 --- a/LArCalorimeter/LArG4/LArG4ShowerLib/src/FCALDistEnergyShowerLib.cxx +++ b/LArCalorimeter/LArG4/LArG4ShowerLib/src/FCALDistEnergyShowerLib.cxx @@ -6,8 +6,8 @@ // this header file #include "LArG4ShowerLib/FCALDistEnergyShowerLib.h" -#include <HepMC/GenParticle.h> -#include <HepMC/GenVertex.h> +#include "AtlasHepMC/GenParticle.h" +#include "AtlasHepMC/GenVertex.h" #include <sstream> #include <fstream> @@ -439,7 +439,7 @@ namespace ShowerLib { return rezR/actualNumFS; //average Z size } - bool FCALDistEnergyShowerLib::storeShower(const HepMC::GenParticle* genParticle, const Shower* shower) + bool FCALDistEnergyShowerLib::storeShower(HepMC::ConstGenParticlePtr genParticle, const Shower* shower) { if (m_filled) { std::cout << "ERROR: filled" << std::endl; diff --git a/LArCalorimeter/LArG4/LArG4ShowerLib/src/FCALDistEtaEnergyShowerLib.cxx b/LArCalorimeter/LArG4/LArG4ShowerLib/src/FCALDistEtaEnergyShowerLib.cxx index ec7f55ecf86ef768b8ed673cd48e8563489e96ae..5fc382b61f46dd3dc47d94585d2a2068d568899d 100644 --- a/LArCalorimeter/LArG4/LArG4ShowerLib/src/FCALDistEtaEnergyShowerLib.cxx +++ b/LArCalorimeter/LArG4/LArG4ShowerLib/src/FCALDistEtaEnergyShowerLib.cxx @@ -1,13 +1,13 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // this header file #include "LArG4ShowerLib/FCALDistEtaEnergyShowerLib.h" -#include <HepMC/GenParticle.h> -#include <HepMC/GenVertex.h> +#include "AtlasHepMC/GenParticle.h" +#include "AtlasHepMC/GenVertex.h" #include <sstream> #include <fstream> @@ -548,7 +548,7 @@ namespace ShowerLib { return rezR/actualNumFS; //average Z size } - bool FCALDistEtaEnergyShowerLib::storeShower(const HepMC::GenParticle* genParticle, const Shower* shower) + bool FCALDistEtaEnergyShowerLib::storeShower(HepMC::ConstGenParticlePtr genParticle, const Shower* shower) { if (m_filled) { std::cout << "ERROR: filled" << std::endl; diff --git a/LArCalorimeter/LArG4/LArG4ShowerLib/src/IShowerLib.cxx b/LArCalorimeter/LArG4/LArG4ShowerLib/src/IShowerLib.cxx index 302778d85945a974f1a78812c326e301dc17f14c..70db67bc40865e1697a2f88e466729b5b6e8eebd 100755 --- a/LArCalorimeter/LArG4/LArG4ShowerLib/src/IShowerLib.cxx +++ b/LArCalorimeter/LArG4/LArG4ShowerLib/src/IShowerLib.cxx @@ -7,7 +7,7 @@ #include "LArG4ShowerLib/IShowerLib.h" #include "TTree.h" #include "G4Track.hh" -#include <HepMC/GenParticle.h> +#include "AtlasHepMC/GenParticle.h" #include <sstream> diff --git a/LArCalorimeter/LArG4/LArG4ShowerLib/src/TestShowerLib.cxx b/LArCalorimeter/LArG4/LArG4ShowerLib/src/TestShowerLib.cxx index e1cde46f1ec5cca43e3713702f03bd290e362458..8d74892998069ac67f95872cde29f569e7f5fcb0 100644 --- a/LArCalorimeter/LArG4/LArG4ShowerLib/src/TestShowerLib.cxx +++ b/LArCalorimeter/LArG4/LArG4ShowerLib/src/TestShowerLib.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -7,8 +7,8 @@ #include "LArG4ShowerLib/TestShowerLib.h" // CLHEP incldues -#include <HepMC/GenParticle.h> -#include <HepMC/GenVertex.h> +#include "AtlasHepMC/GenParticle.h" +#include "AtlasHepMC/GenVertex.h" //#include <algorithm> //#include <functional> @@ -153,7 +153,7 @@ namespace ShowerLib { return 0.0; } -bool TestShowerLib::storeShower(const HepMC::GenParticle* genParticle, const Shower* shower) +bool TestShowerLib::storeShower(HepMC::ConstGenParticlePtr genParticle, const Shower* shower) { if (m_filled) { std::cout << "ERROR: filled" << std::endl; diff --git a/Simulation/BeamEffects/src/GenEventBeamEffectBooster.h b/Simulation/BeamEffects/src/GenEventBeamEffectBooster.h index c42f15a6e19f4c21a037619e127df834325b2925..2d0bb7469e20b229b2e7a8327abe88331b524b43 100644 --- a/Simulation/BeamEffects/src/GenEventBeamEffectBooster.h +++ b/Simulation/BeamEffects/src/GenEventBeamEffectBooster.h @@ -57,7 +57,7 @@ namespace Simulation { /** calculate the transformations that we want to apply to the particles in the current GenEvent */ StatusCode initializeGenEvent(CLHEP::HepLorentzRotation& transform) const; /** apply boost to individual GenParticles */ - void boostParticle(HepMC::GenParticlePtr p, const CLHEP::HepLorentzRotation& transform) const; + void boostParticle(HepMC::GenParticlePtr p, const CLHEP::HepLorentzRotation& transform) const; ServiceHandle<IAthRNGSvc> m_rndGenSvc; ATHRNG::RNGWrapper* m_randomEngine; //!< Slot-local RNG diff --git a/Simulation/BeamEffects/src/GenEventRotator.h b/Simulation/BeamEffects/src/GenEventRotator.h index 0039316aaef5057b3997973abc7929972dd0ec7c..682a9ff41053eb6411a3990e8db0a0bc635bb28c 100644 --- a/Simulation/BeamEffects/src/GenEventRotator.h +++ b/Simulation/BeamEffects/src/GenEventRotator.h @@ -4,10 +4,6 @@ Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -/////////////////////////////////////////////////////////////////// -// GenEventRotator.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - #ifndef ISF_HEPMC_GENEVENTROTATOR_H #define ISF_HEPMC_GENEVENTROTATOR_H 1 diff --git a/Simulation/G4Sim/MCTruth/MCTruth/EventInformation.h b/Simulation/G4Sim/MCTruth/MCTruth/EventInformation.h index 9ea3748848afc5f06d278154f0b3e925bdf8eb77..9b3e6a2a5cc0d96631cb7df711d8b460783ccb28 100644 --- a/Simulation/G4Sim/MCTruth/MCTruth/EventInformation.h +++ b/Simulation/G4Sim/MCTruth/MCTruth/EventInformation.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef EventInformation_H @@ -27,13 +27,13 @@ public: const G4ThreeVector GetVertexPosition() const; void Print() const {} - void SetCurrentPrimary(HepMC::GenParticle *p) {m_currentPrimary=p;} + void SetCurrentPrimary(HepMC::GenParticlePtr p) {m_currentPrimary=p;} - void SetCurrentlyTraced(HepMC::GenParticle *p) {m_currentlyTraced=p;} + void SetCurrentlyTraced(HepMC::GenParticlePtr p) {m_currentlyTraced=p;} - HepMC::GenParticle *GetCurrentPrimary() const {return m_currentPrimary;} + HepMC::GenParticlePtr GetCurrentPrimary() const {return m_currentPrimary;} - HepMC::GenParticle *GetCurrentlyTraced() const {return m_currentlyTraced;} + HepMC::GenParticlePtr GetCurrentlyTraced() const {return m_currentlyTraced;} int SecondaryParticleBarCode() {m_secondaryParticleBarCode++; return m_secondaryParticleBarCode;} int SecondaryVertexBarCode() {m_secondaryVertexBarCode--; @@ -50,8 +50,8 @@ private: int m_secondaryParticleBarCode; int m_secondaryVertexBarCode; HepMC::GenEvent *m_theEvent; - HepMC::GenParticle *m_currentPrimary; - HepMC::GenParticle *m_currentlyTraced; + HepMC::GenParticlePtr m_currentPrimary; + HepMC::GenParticlePtr m_currentlyTraced; // These two are used by calibration hits as event-level flags // They correspond to the last barcode and step processed by an SD // Both are needed, because a particle might have only one step diff --git a/Simulation/G4Sim/MCTruth/MCTruth/PrimaryParticleInformation.h b/Simulation/G4Sim/MCTruth/MCTruth/PrimaryParticleInformation.h index 13eb66a066fe22909825620092b3a68a7f26da3b..009e9e79883cb10eef7261cd33920c481840497f 100644 --- a/Simulation/G4Sim/MCTruth/MCTruth/PrimaryParticleInformation.h +++ b/Simulation/G4Sim/MCTruth/MCTruth/PrimaryParticleInformation.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef PrimaryParticleInformation_H @@ -15,25 +15,25 @@ namespace ISF { class PrimaryParticleInformation: public G4VUserPrimaryParticleInformation { public: - PrimaryParticleInformation(); - PrimaryParticleInformation(const HepMC::GenParticle*, const ISF::ISFParticle* isp=0); - const HepMC::GenParticle *GetHepMCParticle() const; - int GetParticleBarcode() const; - void SuggestBarcode(int bc); - void SetParticle(const HepMC::GenParticle*); - void Print() const {} - int GetRegenerationNr() {return m_regenerationNr;} - void SetRegenerationNr(int i) {m_regenerationNr=i;} - - void SetISFParticle(const ISF::ISFParticle* isp); - const ISF::ISFParticle* GetISFParticle() const; + PrimaryParticleInformation(); + PrimaryParticleInformation(HepMC::ConstGenParticlePtr, const ISF::ISFParticle* isp=0); + HepMC::ConstGenParticlePtr GetHepMCParticle() const; + int GetParticleBarcode() const; + void SuggestBarcode(int bc); + void SetParticle(HepMC::ConstGenParticlePtr); + void Print() const {} + int GetRegenerationNr() {return m_regenerationNr;} + void SetRegenerationNr(int i) {m_regenerationNr=i;} + + void SetISFParticle(const ISF::ISFParticle* isp); + const ISF::ISFParticle* GetISFParticle() const; private: - const HepMC::GenParticle *m_theParticle; - const ISF::ISFParticle* m_theISFParticle; + HepMC::ConstGenParticlePtr m_theParticle{}; + const ISF::ISFParticle* m_theISFParticle{}; - int m_regenerationNr; - int m_barcode; + int m_regenerationNr{0}; + int m_barcode{-1}; }; #endif diff --git a/Simulation/G4Sim/MCTruth/MCTruth/TrackInformation.h b/Simulation/G4Sim/MCTruth/MCTruth/TrackInformation.h index 5d2e2f88203b1f790f354631078e5c7f639bed1d..6726589ae766d9a19ef19a0131a30635c588e4f8 100644 --- a/Simulation/G4Sim/MCTruth/MCTruth/TrackInformation.h +++ b/Simulation/G4Sim/MCTruth/MCTruth/TrackInformation.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TrackInformation_H @@ -14,11 +14,11 @@ namespace ISF { class TrackInformation: public VTrackInformation { public: TrackInformation(); - TrackInformation(const HepMC::GenParticle*,const ISF::ISFParticle* baseIsp=0); - const HepMC::GenParticle *GetHepMCParticle() const; + TrackInformation(HepMC::ConstGenParticlePtr,const ISF::ISFParticle* baseIsp=0); + HepMC::ConstGenParticlePtr GetHepMCParticle() const; const ISF::ISFParticle *GetBaseISFParticle() const; int GetParticleBarcode() const; - void SetParticle(const HepMC::GenParticle*); + void SetParticle(HepMC::ConstGenParticlePtr); void SetBaseISFParticle(const ISF::ISFParticle*); void SetReturnedToISF(bool returned) {m_returnedToISF=returned;}; bool GetReturnedToISF() const {return m_returnedToISF;}; @@ -26,7 +26,7 @@ public: int GetRegenerationNr() const {return m_regenerationNr;}; private: int m_regenerationNr; - const HepMC::GenParticle *m_theParticle; + HepMC::ConstGenParticlePtr m_theParticle; const ISF::ISFParticle *m_theBaseISFParticle; bool m_returnedToISF; }; diff --git a/Simulation/G4Sim/MCTruth/MCTruth/VTrackInformation.h b/Simulation/G4Sim/MCTruth/MCTruth/VTrackInformation.h index 335ccf9f45d392946dc54565aeb9d67a8ccd90e7..57d2a9f0d088b5d2feb55c03412cf11f72f6655b 100644 --- a/Simulation/G4Sim/MCTruth/MCTruth/VTrackInformation.h +++ b/Simulation/G4Sim/MCTruth/MCTruth/VTrackInformation.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef VTrackInformation_H @@ -17,22 +17,22 @@ namespace ISF { class VTrackInformation: public G4VUserTrackInformation { public: - VTrackInformation(TrackClassification tc=Primary); - const HepMC::GenParticle *GetPrimaryHepMCParticle() const; - void SetPrimaryHepMCParticle(const HepMC::GenParticle*); - virtual const HepMC::GenParticle *GetHepMCParticle() const; - virtual const ISF::ISFParticle *GetBaseISFParticle() const; - virtual bool GetReturnedToISF() const; - virtual int GetParticleBarcode() const =0; - virtual void SetParticle(const HepMC::GenParticle*); - virtual void SetBaseISFParticle(const ISF::ISFParticle*); - virtual void SetReturnedToISF(bool) ; - virtual void Print() const {} - void SetClassification(TrackClassification tc) {m_classify=tc;} - TrackClassification GetClassification() {return m_classify;} + VTrackInformation(TrackClassification tc=Primary); + HepMC::ConstGenParticlePtr GetPrimaryHepMCParticle() const; + void SetPrimaryHepMCParticle(HepMC::ConstGenParticlePtr); + virtual HepMC::ConstGenParticlePtr GetHepMCParticle() const; + virtual const ISF::ISFParticle *GetBaseISFParticle() const; + virtual bool GetReturnedToISF() const; + virtual int GetParticleBarcode() const =0; + virtual void SetParticle(HepMC::ConstGenParticlePtr); + virtual void SetBaseISFParticle(const ISF::ISFParticle*); + virtual void SetReturnedToISF(bool) ; + virtual void Print() const {} + void SetClassification(TrackClassification tc) {m_classify=tc;} + TrackClassification GetClassification() {return m_classify;} private: - TrackClassification m_classify; - const HepMC::GenParticle *m_thePrimaryParticle; + TrackClassification m_classify; + HepMC::ConstGenParticlePtr m_thePrimaryParticle{}; }; #endif diff --git a/Simulation/G4Sim/MCTruth/src/PrimaryParticleInformation.cxx b/Simulation/G4Sim/MCTruth/src/PrimaryParticleInformation.cxx index 6f0a1f952c3a27082214f5da1f220bb578b88e2a..c4a1e311f2a609aa0c23d2e5b62ca974f57f9579 100644 --- a/Simulation/G4Sim/MCTruth/src/PrimaryParticleInformation.cxx +++ b/Simulation/G4Sim/MCTruth/src/PrimaryParticleInformation.cxx @@ -1,26 +1,25 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "MCTruth/PrimaryParticleInformation.h" -PrimaryParticleInformation::PrimaryParticleInformation() - : m_theParticle(0),m_theISFParticle(0),m_regenerationNr(0),m_barcode(-1) +PrimaryParticleInformation::PrimaryParticleInformation() { } -PrimaryParticleInformation::PrimaryParticleInformation(const HepMC::GenParticle *p, const ISF::ISFParticle* isp):m_theParticle(p),m_theISFParticle(isp),m_regenerationNr(0),m_barcode(-1) +PrimaryParticleInformation::PrimaryParticleInformation(HepMC::ConstGenParticlePtr p, const ISF::ISFParticle* isp):m_theParticle(p),m_theISFParticle(isp) { } -const HepMC::GenParticle* PrimaryParticleInformation::GetHepMCParticle() const +HepMC::ConstGenParticlePtr PrimaryParticleInformation::GetHepMCParticle() const { - return m_theParticle; + return m_theParticle; } const ISF::ISFParticle* PrimaryParticleInformation::GetISFParticle() const { - return m_theISFParticle; + return m_theISFParticle; } void PrimaryParticleInformation::SuggestBarcode(int bc) @@ -33,15 +32,15 @@ void PrimaryParticleInformation::SuggestBarcode(int bc) int PrimaryParticleInformation::GetParticleBarcode() const { - return m_theParticle?m_theParticle->barcode():m_barcode; + return m_theParticle?HepMC::barcode(m_theParticle):m_barcode; } -void PrimaryParticleInformation::SetParticle(const HepMC::GenParticle* p) +void PrimaryParticleInformation::SetParticle(HepMC::ConstGenParticlePtr p) { - m_theParticle=p; + m_theParticle=p; } void PrimaryParticleInformation::SetISFParticle(const ISF::ISFParticle* p) { - m_theISFParticle=p; + m_theISFParticle=p; } diff --git a/Simulation/G4Sim/MCTruth/src/TrackInformation.cxx b/Simulation/G4Sim/MCTruth/src/TrackInformation.cxx index ca8d9694a832612e3dffe005fea441d2da70a617..fcaa59ba654156430121eb730b89a20a43e1cf97 100644 --- a/Simulation/G4Sim/MCTruth/src/TrackInformation.cxx +++ b/Simulation/G4Sim/MCTruth/src/TrackInformation.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "MCTruth/TrackInformation.h" @@ -9,7 +9,7 @@ TrackInformation::TrackInformation():m_regenerationNr(0),m_theParticle(0),m_theB { } -TrackInformation::TrackInformation(const HepMC::GenParticle *p,const ISF::ISFParticle* baseIsp): +TrackInformation::TrackInformation(HepMC::ConstGenParticlePtr p,const ISF::ISFParticle* baseIsp): m_regenerationNr(0), m_theParticle(p), m_theBaseISFParticle(baseIsp), @@ -17,7 +17,7 @@ TrackInformation::TrackInformation(const HepMC::GenParticle *p,const ISF::ISFPar { } -const HepMC::GenParticle* TrackInformation::GetHepMCParticle() const +HepMC::ConstGenParticlePtr TrackInformation::GetHepMCParticle() const { return m_theParticle; } @@ -31,7 +31,7 @@ int TrackInformation::GetParticleBarcode() const return ( m_theParticle ? m_theParticle->barcode() : 0 ); } -void TrackInformation::SetParticle(const HepMC::GenParticle* p) +void TrackInformation::SetParticle(HepMC::ConstGenParticlePtr p) { m_theParticle=p; } diff --git a/Simulation/G4Sim/MCTruth/src/VTrackInformation.cxx b/Simulation/G4Sim/MCTruth/src/VTrackInformation.cxx index 4f22d902bd4b56a867a3304496cd71e506d53d3f..022afaf4f887d349846229c505a6ee2ff45fa8b2 100644 --- a/Simulation/G4Sim/MCTruth/src/VTrackInformation.cxx +++ b/Simulation/G4Sim/MCTruth/src/VTrackInformation.cxx @@ -1,25 +1,25 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "MCTruth/VTrackInformation.h" -VTrackInformation::VTrackInformation(TrackClassification tc):m_classify(tc),m_thePrimaryParticle(0) +VTrackInformation::VTrackInformation(TrackClassification tc):m_classify(tc) { } -const HepMC::GenParticle* VTrackInformation::GetPrimaryHepMCParticle() const +HepMC::ConstGenParticlePtr VTrackInformation::GetPrimaryHepMCParticle() const { return m_thePrimaryParticle; } -void VTrackInformation::SetPrimaryHepMCParticle(const HepMC::GenParticle* p) +void VTrackInformation::SetPrimaryHepMCParticle(HepMC::ConstGenParticlePtr p) { m_thePrimaryParticle=p; } -const HepMC::GenParticle* VTrackInformation::GetHepMCParticle() const +HepMC::ConstGenParticlePtr VTrackInformation::GetHepMCParticle() const { return 0; } @@ -34,7 +34,7 @@ bool VTrackInformation::GetReturnedToISF() const return false; } -void VTrackInformation::SetParticle(const HepMC::GenParticle* /*p*/) +void VTrackInformation::SetParticle(HepMC::ConstGenParticlePtr /*p*/) { // you should not call this, perhaps throw an exception? std::cerr<<"ERROR VTrackInformation::SetParticle() not supported "<<std::endl; diff --git a/Simulation/G4Utilities/G4UserActions/src/AthenaTrackingAction.cxx b/Simulation/G4Utilities/G4UserActions/src/AthenaTrackingAction.cxx index d5180ab1f8ba171ff823daaea1c249f59f35be25..cd95ed929b74bf60120c60beaac30379c8666eab 100644 --- a/Simulation/G4Utilities/G4UserActions/src/AthenaTrackingAction.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/AthenaTrackingAction.cxx @@ -46,8 +46,8 @@ namespace G4UA { // Why a const_cast??? // This is an ugly way to communicate the GenParticle... - HepMC::GenParticle* part = - const_cast<HepMC::GenParticle*>( trackHelper.GetTrackInformation()-> + HepMC::GenParticlePtr part = + const_cast<HepMC::GenParticlePtr>( trackHelper.GetTrackInformation()-> GetHepMCParticle() ); // Assign the GenParticle to the EventInformation. diff --git a/Simulation/G4Utilities/TrackWriteFastSim/src/NeutronFastSim.cxx b/Simulation/G4Utilities/TrackWriteFastSim/src/NeutronFastSim.cxx index 67c21f18f55a7512e19702427787479f9cf523b5..297f99d5f8e1ea69d0b0dc2684adb1f394ef8ef7 100644 --- a/Simulation/G4Utilities/TrackWriteFastSim/src/NeutronFastSim.cxx +++ b/Simulation/G4Utilities/TrackWriteFastSim/src/NeutronFastSim.cxx @@ -51,7 +51,7 @@ G4bool NeutronFastSim::ModelTrigger(const G4FastTrack& fastTrack) // Not a neutron... Pick it up if the primary had eta>6.0 EventInformation *eventInfo=static_cast<EventInformation*>(G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetUserInformation()); - HepMC::GenParticle *gp = eventInfo->GetCurrentPrimary(); + HepMC::GenParticlePtr gp = eventInfo->GetCurrentPrimary(); if (fabs(gp->momentum().eta())>m_etaCut && gp->barcode()<200000){ return true; } else { diff --git a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/HepMCHelper.h b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/HepMCHelper.h index ca3491cdbf5b1218e29e310ae2d85b3abe9e400b..69ed5994ff622a12c444542562173c303716e3d9 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/HepMCHelper.h +++ b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/HepMCHelper.h @@ -51,7 +51,7 @@ namespace ISF { at least one particle with one of the given PDG codes appears. returns pointer to first found particle that matches any of the given PDG codes in relativesPDG */ - static inline const HepMC::GenParticle * findRealtiveWithPDG( const HepMC::GenParticle &genParticle, + static inline HepMC::ConstGenParticlePtr findRealtiveWithPDG( const HepMC::GenParticle &genParticle, const HepMC::IteratorRange &relation, const std::set<int> &relativesPDG ); }; diff --git a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/HepMCHelper.icc b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/HepMCHelper.icc index 9dc21beddaf240ca7a2af36028a4f2506886a5d4..ba477d1d70cebcb551e5bdcf5bc51c7b1735609b 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/HepMCHelper.icc +++ b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/HepMCHelper.icc @@ -29,7 +29,7 @@ HepMC::IteratorRange ISF::HepMCHelper::convertIteratorRange( int intItRange ) { else return ( HepMC::parents ); } -const HepMC::GenParticle * ISF::HepMCHelper::findRealtiveWithPDG( const HepMC::GenParticle &genParticle, +HepMC::ConstGenParticlePtr ISF::HepMCHelper::findRealtiveWithPDG( const HepMC::GenParticle &genParticle, const HepMC::IteratorRange &relation, const std::set<int> &relativesPDG ) { @@ -39,7 +39,7 @@ const HepMC::GenParticle * ISF::HepMCHelper::findRealtiveWithPDG( const HepMC::G // loop over relatives HepMC::GenVertex::particle_iterator partIt = relativesRng.begin(); const HepMC::GenVertex::particle_iterator partEnd = relativesRng.end(); - const HepMC::GenParticle *curRelative = 0; + HepMC::ConstGenParticlePtr curRelative{}; bool found = false; for ( ; (!found) && (partIt!=partEnd) ; ++partIt) { curRelative = (*partIt) ; diff --git a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ISFTruthIncident.h b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ISFTruthIncident.h index c45ff5d3285f61d9e929fe3603bb19e0cff60521..47b240cf900fdaf17a5e5eba3f714727b63a1bfc 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ISFTruthIncident.h +++ b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ISFTruthIncident.h @@ -67,7 +67,7 @@ namespace ISF { int parentPdgCode() const override final; /** Return the parent particle as a HepMC particle type (usually only called for particles that will enter the HepMC truth event) */ - HepMC::GenParticle* parentParticle() const override final; + HepMC::GenParticlePtr parentParticle() const override final; /** Return the barcode of the parent particle */ Barcode::ParticleBarcode parentBarcode() const override final; /** Return the bunch-crossing identifier of the parent particle */ @@ -76,7 +76,7 @@ namespace ISF { bool parentSurvivesIncident() const override final; /** Return the parent particle after the TruthIncident vertex (and give it a new barcode) */ - HepMC::GenParticle* parentParticleAfterIncident(Barcode::ParticleBarcode newBC) override final; + HepMC::GenParticlePtr parentParticleAfterIncident(Barcode::ParticleBarcode newBC) override final; /** Return p^2 of the i-th child particle */ double childP2(unsigned short index) const override final; @@ -89,24 +89,24 @@ namespace ISF { /** Return the i-th child as a HepMC particle type and assign the given Barcode to the simulator particle (usually only called for particles that will enter the HepMC truth event) */ - HepMC::GenParticle* childParticle(unsigned short index, + HepMC::GenParticlePtr childParticle(unsigned short index, Barcode::ParticleBarcode bc) const override final; /** Update the properties of a child particle from a pre-defined interaction based on the properties of the ith child of the current TruthIncident (only used in quasi-stable particle simulation) - TODO only a dummy implementation currently */ - virtual HepMC::GenParticle* updateChildParticle(unsigned short index, - HepMC::GenParticle *existingChild) const override final; + virtual HepMC::GenParticlePtr updateChildParticle(unsigned short index, + HepMC::GenParticlePtr existingChild) const override final; /** Set the the barcode of all child particles to the given bc */ void setAllChildrenBarcodes(Barcode::ParticleBarcode bc) override final; private: ISFTruthIncident(); /** return attached truth particle */ - inline HepMC::GenParticle* getHepMCTruthParticle( const ISF::ISFParticle& particle ) const; + inline HepMC::GenParticlePtr getHepMCTruthParticle( const ISF::ISFParticle& particle ) const; /** convert ISFParticle to GenParticle and attach to ISFParticle's TruthBinding */ - inline HepMC::GenParticle* updateHepMCTruthParticle( ISF::ISFParticle& particle, const ISF::ISFParticle* parent=nullptr ) const; + inline HepMC::GenParticlePtr updateHepMCTruthParticle( ISF::ISFParticle& particle, const ISF::ISFParticle* parent=nullptr ) const; ISF::ISFParticle& m_parent; const ISFParticleVector& m_children; diff --git a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ITruthIncident.h b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ITruthIncident.h index 3882f1d43ccb3c0b49bb46e2583fae5b95e6cb86..843d0645c6f6b747c12d90c0551d196121b8b69a 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ITruthIncident.h +++ b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ITruthIncident.h @@ -74,7 +74,7 @@ namespace ISF { virtual int parentPdgCode() const = 0; /** Return the parent particle as a HepMC particle type (only called for particles that will enter the HepMC truth event) */ - virtual HepMC::GenParticle* parentParticle() const = 0; + virtual HepMC::GenParticlePtr parentParticle() const = 0; /** Return the barcode of the parent particle */ virtual Barcode::ParticleBarcode parentBarcode() const = 0; /** Return the bunch-crossing identifier of the parent particle */ @@ -83,7 +83,7 @@ namespace ISF { virtual bool parentSurvivesIncident() const = 0; /** Return the parent particle after the TruthIncident vertex (and assign a new barcode to it) */ - virtual HepMC::GenParticle* parentParticleAfterIncident(Barcode::ParticleBarcode newBC) = 0; + virtual HepMC::GenParticlePtr parentParticleAfterIncident(Barcode::ParticleBarcode newBC) = 0; /** Return total number of child particles */ inline unsigned short numberOfChildren() const; @@ -107,14 +107,14 @@ namespace ISF { /** Return the i-th child as a HepMC particle type and assign the given Barcode to the simulator particle (only called for particles that will enter the HepMC truth event) */ - virtual HepMC::GenParticle* childParticle(unsigned short index, + virtual HepMC::GenParticlePtr childParticle(unsigned short index, Barcode::ParticleBarcode bc = Barcode::fUndefinedBarcode) const = 0; /** Update the properties of a child particle from a pre-defined interaction based on the properties of the ith child of the current TruthIncident (only used in quasi-stable particle simulation). */ - virtual HepMC::GenParticle* updateChildParticle(unsigned short index, - HepMC::GenParticle *existingChild) const = 0; + virtual HepMC::GenParticlePtr updateChildParticle(unsigned short index, + HepMC::GenParticlePtr existingChild) const = 0; /** Set the the barcode of all child particles to the given bc */ virtual void setAllChildrenBarcodes(Barcode::ParticleBarcode bc) = 0; diff --git a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ParticleHelper.h b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ParticleHelper.h index 48072b67b79d792570480aadc66e2642e383e49f..65e471791f27a5877da3db482629809c88d25ac7 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ParticleHelper.h +++ b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ParticleHelper.h @@ -35,7 +35,7 @@ namespace ISF { ~ParticleHelper() {} ; /** convert the given particle to HepMC format */ - static HepMC::GenParticle *convert( const ISF::ISFParticle &p); + static HepMC::GenParticlePtr convert( const ISF::ISFParticle &p); private : }; diff --git a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.h b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.h index 599779d35715c687a3c5b200ef46f0ec13fcd63c..e5352b5c7fa81a5d59b1108b121b06f9eca6cd85 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.h +++ b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.h @@ -25,9 +25,9 @@ namespace ISF { TruthBinding() = delete; /** constructor setting all truth particle pointers to the given particle */ - inline TruthBinding(HepMC::GenParticle* allTruthP); + inline TruthBinding(HepMC::GenParticlePtr allTruthP); /** constructor setting all truth particle pointers individually */ - inline TruthBinding(HepMC::GenParticle* truthP, HepMC::GenParticle* primaryTruthP, HepMC::GenParticle* genZeroTruthP); + inline TruthBinding(HepMC::GenParticlePtr truthP, HepMC::GenParticlePtr primaryTruthP, HepMC::GenParticlePtr genZeroTruthP); /** copy constructors */ inline TruthBinding(const TruthBinding &rhs); @@ -46,20 +46,20 @@ namespace ISF { inline ~TruthBinding(); /** pointer to the particle in the simulation truth */ - inline HepMC::GenParticle* getTruthParticle() const; - inline void setTruthParticle(HepMC::GenParticle* p); + inline HepMC::GenParticlePtr getTruthParticle() const; + inline void setTruthParticle(HepMC::GenParticlePtr p); /** pointer to the primary particle in the simulation truth */ - inline HepMC::GenParticle* getPrimaryTruthParticle() const; + inline HepMC::GenParticlePtr getPrimaryTruthParticle() const; /** pointer to the simulation truth particle before any regeneration happened (eg. brem) */ - inline HepMC::GenParticle* getGenerationZeroTruthParticle() const; - inline void setGenerationZeroTruthParticle(HepMC::GenParticle* p); + inline HepMC::GenParticlePtr getGenerationZeroTruthParticle() const; + inline void setGenerationZeroTruthParticle(HepMC::GenParticlePtr p); private: - HepMC::GenParticle* m_truthParticle; //!< pointer to particle in MC truth - HepMC::GenParticle* m_primaryTruthParticle; //!< pointer to corresponding primary (generator) particle - HepMC::GenParticle* m_generationZeroTruthParticle; //!< pointer to corresponding truth particle before any regenration + HepMC::GenParticlePtr m_truthParticle{}; //!< pointer to particle in MC truth + HepMC::GenParticlePtr m_primaryTruthParticle{}; //!< pointer to corresponding primary (generator) particle + HepMC::GenParticlePtr m_generationZeroTruthParticle{}; //!< pointer to corresponding truth particle before any regenration }; } // end of namespace diff --git a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.icc b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.icc index b97272c450be06a523487819c89296ce977169b3..91c73a6f98b9244429b0e80eb907e607b97d062f 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.icc +++ b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.icc @@ -1,18 +1,18 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // this file contains all ITruthBinding inline methods namespace ISF { /** constructor setting all truth particle pointers to the given particle */ - TruthBinding::TruthBinding(HepMC::GenParticle* allTruthP) : + TruthBinding::TruthBinding(HepMC::GenParticlePtr allTruthP) : m_truthParticle(allTruthP), m_primaryTruthParticle(allTruthP), m_generationZeroTruthParticle(allTruthP) { } /** constructor setting all truth particle pointers individually */ - TruthBinding::TruthBinding(HepMC::GenParticle* truthP, HepMC::GenParticle* primaryTruthP, HepMC::GenParticle* genZeroTruthP) : + TruthBinding::TruthBinding(HepMC::GenParticlePtr truthP, HepMC::GenParticlePtr primaryTruthP, HepMC::GenParticlePtr genZeroTruthP) : m_truthParticle(truthP), m_primaryTruthParticle(primaryTruthP), m_generationZeroTruthParticle(genZeroTruthP) { } @@ -91,14 +91,14 @@ namespace ISF { } /** pointer to the particle in the simulation truth */ - HepMC::GenParticle* TruthBinding::getTruthParticle() const { return m_truthParticle; } - void TruthBinding::setTruthParticle(HepMC::GenParticle* p) { m_truthParticle = p; } + HepMC::GenParticlePtr TruthBinding::getTruthParticle() const { return m_truthParticle; } + void TruthBinding::setTruthParticle(HepMC::GenParticlePtr p) { m_truthParticle = p; } /** pointer to the primary particle in the simulation truth */ - HepMC::GenParticle* TruthBinding::getPrimaryTruthParticle() const { return m_primaryTruthParticle; } + HepMC::GenParticlePtr TruthBinding::getPrimaryTruthParticle() const { return m_primaryTruthParticle; } /** pointer to the simulation truth particle before any regeneration (eg. brem) */ - HepMC::GenParticle* TruthBinding::getGenerationZeroTruthParticle() const { return m_generationZeroTruthParticle; } - void TruthBinding::setGenerationZeroTruthParticle(HepMC::GenParticle* p) { m_generationZeroTruthParticle = p; } + HepMC::GenParticlePtr TruthBinding::getGenerationZeroTruthParticle() const { return m_generationZeroTruthParticle; } + void TruthBinding::setGenerationZeroTruthParticle(HepMC::GenParticlePtr p) { m_generationZeroTruthParticle = p; } } // end ISF namespace diff --git a/Simulation/ISF/ISF_Core/ISF_Event/src/ISFTruthIncident.cxx b/Simulation/ISF/ISF_Core/ISF_Event/src/ISFTruthIncident.cxx index e91de330fe4098272dcbe9da5662f79dfec942ec..4c8aa3f2b174d8212a787254c2141a54cc5e74c7 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/src/ISFTruthIncident.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Event/src/ISFTruthIncident.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -77,7 +77,7 @@ int ISF::ISFTruthIncident::parentPdgCode() const { return m_parent.pdgCode(); } -HepMC::GenParticle* ISF::ISFTruthIncident::parentParticle() const { +HepMC::GenParticlePtr ISF::ISFTruthIncident::parentParticle() const { if ( m_parent.getTruthBinding() || m_parent.getParticleLink()) { return getHepMCTruthParticle(m_parent); } else { @@ -97,7 +97,7 @@ bool ISF::ISFTruthIncident::parentSurvivesIncident() const { return !(m_killsPrimary == ISF::fKillsPrimary); } -HepMC::GenParticle* ISF::ISFTruthIncident::parentParticleAfterIncident(Barcode::ParticleBarcode newBC) { +HepMC::GenParticlePtr ISF::ISFTruthIncident::parentParticleAfterIncident(Barcode::ParticleBarcode newBC) { // if parent is killed in the interaction -> return nullptr if (m_killsPrimary==ISF::fKillsPrimary) return nullptr; @@ -127,7 +127,7 @@ int ISF::ISFTruthIncident::childPdgCode(unsigned short index) const { return m_children[index]->pdgCode(); } -HepMC::GenParticle* ISF::ISFTruthIncident::childParticle(unsigned short index, +HepMC::GenParticlePtr ISF::ISFTruthIncident::childParticle(unsigned short index, Barcode::ParticleBarcode bc) const { // the child particle ISF::ISFParticle *sec = m_children[index]; @@ -141,8 +141,8 @@ HepMC::GenParticle* ISF::ISFTruthIncident::childParticle(unsigned short index, return updateHepMCTruthParticle( *sec, &m_parent ); } -HepMC::GenParticle* ISF::ISFTruthIncident::updateChildParticle(unsigned short /*index*/, - HepMC::GenParticle *existingChild) const { +HepMC::GenParticlePtr ISF::ISFTruthIncident::updateChildParticle(unsigned short /*index*/, + HepMC::GenParticlePtr existingChild) const { // Dummy implementation return existingChild; } @@ -162,7 +162,7 @@ void ISF::ISFTruthIncident::setAllChildrenBarcodes(Barcode::ParticleBarcode bc) /** return attached truth particle */ -HepMC::GenParticle* ISF::ISFTruthIncident::getHepMCTruthParticle( const ISF::ISFParticle& particle ) const { +HepMC::GenParticlePtr ISF::ISFTruthIncident::getHepMCTruthParticle( const ISF::ISFParticle& particle ) const { auto* truthBinding = particle.getTruthBinding(); auto* hepTruthParticle = truthBinding ? truthBinding->getTruthParticle() : nullptr; @@ -170,7 +170,7 @@ HepMC::GenParticle* ISF::ISFTruthIncident::getHepMCTruthParticle( const ISF::ISF if (!hepTruthParticle) { const HepMcParticleLink* oldHMPL = particle.getParticleLink(); if (oldHMPL && oldHMPL->cptr()) - hepTruthParticle = const_cast<HepMC::GenParticle*>(oldHMPL->cptr()); + hepTruthParticle = const_cast<HepMC::GenParticlePtr>(oldHMPL->cptr()); } return hepTruthParticle; @@ -178,8 +178,8 @@ HepMC::GenParticle* ISF::ISFTruthIncident::getHepMCTruthParticle( const ISF::ISF /** convert ISFParticle to GenParticle and attach to ISFParticle's TruthBinding */ -HepMC::GenParticle* ISF::ISFTruthIncident::updateHepMCTruthParticle( ISF::ISFParticle& particle, - const ISF::ISFParticle* parent ) const { +HepMC::GenParticlePtr ISF::ISFTruthIncident::updateHepMCTruthParticle( ISF::ISFParticle& particle, + const ISF::ISFParticle* parent ) const { auto* truthBinding = particle.getTruthBinding(); auto* hepTruthParticle = ParticleHelper::convert( particle ); diff --git a/Simulation/ISF/ISF_Core/ISF_Event/src/ParticleHelper.cxx b/Simulation/ISF/ISF_Core/ISF_Event/src/ParticleHelper.cxx index c8de9a6e0bdbea210008591e1e166283ee4c0d9e..e9326b860d861e580ea4a1fce5676b5cd3860b91 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/src/ParticleHelper.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Event/src/ParticleHelper.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -17,7 +17,7 @@ // ISF includes #include "ISF_Event/ISFParticle.h" -HepMC::GenParticle* ISF::ParticleHelper::convert( const ISF::ISFParticle &particle) { +HepMC::GenParticlePtr ISF::ParticleHelper::convert( const ISF::ISFParticle &particle) { const Amg::Vector3D &mom = particle.momentum(); double mass = particle.mass(); @@ -25,8 +25,8 @@ HepMC::GenParticle* ISF::ParticleHelper::convert( const ISF::ISFParticle &partic HepMC::FourVector fourMomentum( mom.x(), mom.y(), mom.z(), energy); int status = 1; // stable particle not decayed by EventGenerator - auto* hepParticle = new HepMC::GenParticle( fourMomentum, particle.pdgCode(), status ); - hepParticle->suggest_barcode( particle.barcode() ); + auto hepParticle = HepMC::newGenParticlePtr( fourMomentum, particle.pdgCode(), status ); + HepMC::suggest_barcode(hepParticle, particle.barcode() ); // return a newly created GenParticle return hepParticle; diff --git a/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx b/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx index a012c1c5c77aaeaf1a9f4a3156ec16f0fc74be00..73e3231492312f59889607e7b31f453f79a45a75 100644 --- a/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx @@ -187,13 +187,13 @@ StatusCode ISF::InputConverter::convertHepMCToG4Event(McEventCollection& inputGe /** get all generator particles which pass filters */ -std::vector<HepMC::GenParticle*> +std::vector<HepMC::GenParticlePtr> ISF::InputConverter::getSelectedParticles(const HepMC::GenEvent& evnt, bool legacyOrdering) const { auto allGenPartBegin = evnt.particles_begin(); auto allGenPartEnd = evnt.particles_end(); // reserve destination container with maximum size, i.e. number of particles in input event - std::vector<HepMC::GenParticle*> passedGenParticles{}; + std::vector<HepMC::GenParticlePtr> passedGenParticles{}; size_t maxParticles = std::distance(allGenPartBegin, allGenPartEnd); passedGenParticles.reserve(maxParticles); @@ -207,14 +207,14 @@ ISF::InputConverter::getSelectedParticles(const HepMC::GenEvent& evnt, bool lega std::copy_if(vtxPtr->particles_begin(HepMC::children), vtxPtr->particles_end(HepMC::children), std::back_inserter(passedGenParticles), - [this](HepMC::GenParticle* p){return this->passesFilters(*p);}); + [this](HepMC::GenParticlePtr p){return this->passesFilters(*p);}); } } else { std::copy_if(allGenPartBegin, allGenPartEnd, std::back_inserter(passedGenParticles), - [this](HepMC::GenParticle* p){return this->passesFilters(*p);}); + [this](HepMC::GenParticlePtr p){return this->passesFilters(*p);}); } passedGenParticles.shrink_to_fit(); @@ -225,7 +225,7 @@ ISF::InputConverter::getSelectedParticles(const HepMC::GenEvent& evnt, bool lega /** get all generator particles which pass filters */ ISF::ISFParticle* -ISF::InputConverter::convertParticle(HepMC::GenParticle* genPartPtr, EBC_EVCOLL kindOfCollection) const { +ISF::InputConverter::convertParticle(HepMC::GenParticlePtr genPartPtr, EBC_EVCOLL kindOfCollection) const { if (!genPartPtr) { return nullptr; } auto& genPart = *genPartPtr; @@ -483,8 +483,8 @@ G4PrimaryParticle* ISF::InputConverter::getG4PrimaryParticle(const ISF::ISFParti G4Exception("iGeant4::TransportTool", "NoISFTruthBinding", FatalException, description); return nullptr; //The G4Exception call above should abort the job, but Coverity does not seem to pick this up. } - HepMC::GenParticle* genpart = truthBinding->getTruthParticle(); - HepMC::GenParticle* primaryGenpart = truthBinding->getPrimaryTruthParticle(); + HepMC::GenParticlePtr genpart = truthBinding->getTruthParticle(); + HepMC::GenParticlePtr primaryGenpart = truthBinding->getPrimaryTruthParticle(); const G4ParticleDefinition *particleDefinition = this->getG4ParticleDefinition(isp.pdgCode()); @@ -595,7 +595,7 @@ G4PrimaryParticle* ISF::InputConverter::getG4PrimaryParticle(const ISF::ISFParti //For backward compatibility, if all 3-momentum components agree to the g4particle momentum within 1 keV, we keep //this old method. This comparison is needed, since in ISF this code could be rerun after the ID or CALO simulation, where //real energy was lost in previous detectors and hence genpart should NOT be changed to some g4particle values! - //TODO: find a way to implement this in a backward compatible way in ISF::InputConverter::convertParticle(HepMC::GenParticle* genPartPtr, int bcid) + //TODO: find a way to implement this in a backward compatible way in ISF::InputConverter::convertParticle(HepMC::GenParticlePtr genPartPtr, int bcid) if(std::abs(px-g4px)<CLHEP::keV && std::abs(py-g4py)<CLHEP::keV && std::abs(pz-g4pz)<CLHEP::keV) { px=g4px; py=g4py; diff --git a/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.h b/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.h index 6e15cc8ee06da3387135694bc172e70b7e2ead6b..59b42820c371f78fdcb3c8553e59745b4ed25c10 100644 --- a/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.h +++ b/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.h @@ -102,7 +102,7 @@ namespace ISF { bool passesFilters(const HepMC::GenParticle& p) const; /** convert GenParticle to ISFParticle */ - ISF::ISFParticle* convertParticle(HepMC::GenParticle* genPartPtr, EBC_EVCOLL kindOfCollection=EBC_MAINEVCOLL) const; + ISF::ISFParticle* convertParticle(HepMC::GenParticlePtr genPartPtr, EBC_EVCOLL kindOfCollection=EBC_MAINEVCOLL) const; /** ParticlePropertyService and ParticleDataTable */ ServiceHandle<IPartPropSvc> m_particlePropSvc; //!< particle properties svc to retrieve PDT diff --git a/Simulation/ISF/ISF_Core/ISF_Services/src/TruthSvc.cxx b/Simulation/ISF/ISF_Core/ISF_Services/src/TruthSvc.cxx index 4814b4633525a4a87ccc2454f22a5a6aeb1122c9..f793776e574b871b24204412671ffeacbbc20a4f 100644 --- a/Simulation/ISF/ISF_Core/ISF_Services/src/TruthSvc.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Services/src/TruthSvc.cxx @@ -132,12 +132,12 @@ StatusCode ISF::TruthSvc::initializeTruthCollection() } /** Delete child vertex */ -void ISF::TruthSvc::deleteChildVertex(HepMC::GenVertex* vertex) const { - std::vector<HepMC::GenVertex*> verticesToDelete; +void ISF::TruthSvc::deleteChildVertex(HepMC::GenVertexPtr vertex) const { + std::vector<HepMC::GenVertexPtr> verticesToDelete; verticesToDelete.resize(0); verticesToDelete.push_back(vertex); for ( unsigned short i = 0; i<verticesToDelete.size(); ++i ) { - HepMC::GenVertex* vtx = verticesToDelete.at(i); + HepMC::GenVertexPtr vtx = verticesToDelete.at(i); for (HepMC::GenVertex::particles_out_const_iterator iter = vtx->particles_out_const_begin(); iter != vtx->particles_out_const_end(); ++iter) { if( (*iter) && (*iter)->end_vertex() ) { @@ -292,7 +292,7 @@ void ISF::TruthSvc::recordIncidentToMCTruth( ISF::ITruthIncident& ti) const { ATH_MSG_INFO("New QS GenVertex 1: " << *(newVtx.get()) ); #endif HepMC::GenEvent *mcEvent = parentBeforeIncident->parent_event(); - newVtx->suggest_barcode( this->maxGeneratedVertexBarcode(mcEvent)-1 ); + HepMC::suggest_barcode(newVtx.get(), this->maxGeneratedVertexBarcode(mcEvent)-1 ); #ifdef DEBUG_TRUTHSVC ATH_MSG_INFO("New QSGenVertex 2: " << *(newVtx.get()) ); #endif @@ -332,8 +332,8 @@ void ISF::TruthSvc::recordIncidentToMCTruth( ISF::ITruthIncident& ti) const { ATH_MSG_VERBOSE("Existing vertex has " << nVertexChildren << " children. " << "Number of secondaries in current truth incident = " << numSec); } - const std::vector<HepMC::GenParticle*> childParticleVector = (isQuasiStableVertex) ? MC::findChildren(ti.parentParticle()) : std::vector<HepMC::GenParticle*>(); - std::vector<HepMC::GenParticle*> matchedChildParticles; + const std::vector<HepMC::GenParticlePtr> childParticleVector = (isQuasiStableVertex) ? MC::findChildren(ti.parentParticle()) : std::vector<HepMC::GenParticlePtr>(); + std::vector<HepMC::GenParticlePtr> matchedChildParticles; for ( unsigned short i=0; i<numSec; ++i) { bool writeOutChild = isQuasiStableVertex || m_passWholeVertex || ti.childPassedFilters(i); @@ -430,7 +430,7 @@ HepMC::GenVertex *ISF::TruthSvc::createGenVertexFromTruthIncident( ISF::ITruthIn } int vtxID = 1000 + static_cast<int>(processCode); std::unique_ptr<HepMC::GenVertex> vtx = std::make_unique<HepMC::GenVertex>( ti.position(), vtxID, weights ); - vtx->suggest_barcode( vtxbcode ); + HepMC::suggest_barcode( vtx.get(), vtxbcode ); if (parent->end_vertex()){ if(!m_quasiStableParticlesIncluded) { diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/ISF_Geant4Event/Geant4TruthIncident.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/ISF_Geant4Event/Geant4TruthIncident.h index 27693a6dfd2d714a8d5db07aef7ef3986198f906..d4770981320394d56514699d8e2d637f1bc28f20 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/ISF_Geant4Event/Geant4TruthIncident.h +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/ISF_Geant4Event/Geant4TruthIncident.h @@ -68,7 +68,7 @@ namespace iGeant4 { bool parentSurvivesIncident() const override final; /** Return the parent particle after the TruthIncident vertex (and give it a new barcode) */ - HepMC::GenParticle* parentParticleAfterIncident(Barcode::ParticleBarcode newBC) override final; + HepMC::GenParticlePtr parentParticleAfterIncident(Barcode::ParticleBarcode newBC) override final; /** Return p of the i-th child particle */ const G4ThreeVector childP(unsigned short index) const; @@ -95,17 +95,17 @@ namespace iGeant4 { // only called once accepted /** Return the parent particle as a HepMC particle type */ - HepMC::GenParticle* parentParticle() const override final; + HepMC::GenParticlePtr parentParticle() const override final; /** Return the i-th child as a HepMC particle type and assign the given Barcode to the simulator particle */ - HepMC::GenParticle* childParticle(unsigned short index, - Barcode::ParticleBarcode bc) const override final; + HepMC::GenParticlePtr childParticle(unsigned short index, + Barcode::ParticleBarcode bc) const override final; /** Update the properties of a child particle from a pre-defined interaction based on the properties of the ith child of the current TruthIncident (only used in quasi-stable particle simulation). */ - HepMC::GenParticle* updateChildParticle(unsigned short index, - HepMC::GenParticle *existingChild) const override final; + HepMC::GenParticlePtr updateChildParticle(unsigned short index, + HepMC::GenParticlePtr existingChild) const override final; private: Geant4TruthIncident(); /** prepare the child particles */ @@ -114,18 +114,18 @@ namespace iGeant4 { /** check if the given G4Track represents a particle that is alive in ISF or ISF-G4 */ inline bool particleAlive(const G4Track *track) const; - HepMC::GenParticle* convert(const G4Track *particle, const int barcode, const bool secondary) const; //*AS* might be put static + HepMC::GenParticlePtr convert(const G4Track *particle, const int barcode, const bool secondary) const; //*AS* might be put static mutable bool m_positionSet; mutable HepMC::FourVector m_position; - const G4Step* m_step; + const G4Step* m_step{}; const ISF::ISFParticle& m_baseISP; - EventInformation* m_eventInfo; + EventInformation* m_eventInfo{}; mutable bool m_childrenPrepared; mutable std::vector<const G4Track*> m_children; - HepMC::GenParticle* m_parentParticleAfterIncident; + HepMC::GenParticlePtr m_parentParticleAfterIncident{}; }; } diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/ISF_Geant4Event/ISFG4Helper.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/ISF_Geant4Event/ISFG4Helper.h index 443734dee6a7c654edccd458c00b9affce5ec549..2cae499ed00089397657d146d71bf2509f2ef16f 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/ISF_Geant4Event/ISFG4Helper.h +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/ISF_Geant4Event/ISFG4Helper.h @@ -49,7 +49,7 @@ class ISFG4Helper { static TrackInformation* attachTrackInfoToNewG4Track( G4Track& aTrack, const ISF::ISFParticle& baseIsp, TrackClassification classification, - HepMC::GenParticle *nonRegeneratedTruthParticle = nullptr); + HepMC::GenParticlePtr nonRegeneratedTruthParticle = nullptr); /** return pointer to current EventInformation */ static EventInformation* getEventInformation(); diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/src/Geant4TruthIncident.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/src/Geant4TruthIncident.cxx index 4e47e2f8ed461df92f7926c3a557c9d25ad14bb4..e6593e152ed589b9b67739f5dbd69031bd2abdb4 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/src/Geant4TruthIncident.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/src/Geant4TruthIncident.cxx @@ -121,11 +121,11 @@ int iGeant4::Geant4TruthIncident::parentPdgCode() const { Barcode::ParticleBarcode iGeant4::Geant4TruthIncident::parentBarcode() const { auto parent = parentParticle(); - return (parent) ? parent->barcode() : Barcode::fUndefinedBarcode; + return (parent) ? HepMC::barcode(parent) : Barcode::fUndefinedBarcode; } -HepMC::GenParticle* iGeant4::Geant4TruthIncident::parentParticle() const { - HepMC::GenParticle* hepParticle = m_eventInfo->GetCurrentlyTraced(); +HepMC::GenParticlePtr iGeant4::Geant4TruthIncident::parentParticle() const { + HepMC::GenParticlePtr hepParticle = m_eventInfo->GetCurrentlyTraced(); return hepParticle; } @@ -146,7 +146,7 @@ bool iGeant4::Geant4TruthIncident::parentSurvivesIncident() const { } } -HepMC::GenParticle* iGeant4::Geant4TruthIncident::parentParticleAfterIncident(Barcode::ParticleBarcode newBarcode) { +HepMC::GenParticlePtr iGeant4::Geant4TruthIncident::parentParticleAfterIncident(Barcode::ParticleBarcode newBarcode) { const G4Track *track = m_step->GetTrack(); // check if particle is a alive in G4 or in ISF @@ -219,8 +219,8 @@ void iGeant4::Geant4TruthIncident::setAllChildrenBarcodes(Barcode::ParticleBarco G4Exception("iGeant4::Geant4TruthIncident", "NotImplemented", FatalException, description); } -HepMC::GenParticle* iGeant4::Geant4TruthIncident::childParticle(unsigned short i, - Barcode::ParticleBarcode newBarcode) const { +HepMC::GenParticlePtr iGeant4::Geant4TruthIncident::childParticle(unsigned short i, + Barcode::ParticleBarcode newBarcode) const { prepareChildren(); // the G4Track instance for the current child particle @@ -230,7 +230,7 @@ HepMC::GenParticle* iGeant4::Geant4TruthIncident::childParticle(unsigned short i // secondary could decay right away and create further particles which pass the // truth strategies. - HepMC::GenParticle* hepParticle = convert( thisChildTrack , newBarcode , true ); + HepMC::GenParticlePtr hepParticle = convert( thisChildTrack , newBarcode , true ); TrackHelper tHelper(thisChildTrack); TrackInformation *trackInfo = tHelper.GetTrackInformation(); @@ -249,8 +249,8 @@ HepMC::GenParticle* iGeant4::Geant4TruthIncident::childParticle(unsigned short i } -HepMC::GenParticle* iGeant4::Geant4TruthIncident::updateChildParticle(unsigned short index, - HepMC::GenParticle *existingChild) const { +HepMC::GenParticlePtr iGeant4::Geant4TruthIncident::updateChildParticle(unsigned short index, + HepMC::GenParticlePtr existingChild) const { prepareChildren(); // the G4Track instance for the current child particle @@ -310,7 +310,7 @@ bool iGeant4::Geant4TruthIncident::particleAlive(const G4Track *track) const { } -HepMC::GenParticle* iGeant4::Geant4TruthIncident::convert(const G4Track *track, const int barcode, const bool secondary) const { +HepMC::GenParticlePtr iGeant4::Geant4TruthIncident::convert(const G4Track *track, const int barcode, const bool secondary) const { const G4ThreeVector & mom = track->GetMomentum(); const double energy = track->GetTotalEnergy(); @@ -318,7 +318,7 @@ HepMC::GenParticle* iGeant4::Geant4TruthIncident::convert(const G4Track *track, const HepMC::FourVector fourMomentum( mom.x(), mom.y(), mom.z(), energy); const int status = 1; // stable particle not decayed by EventGenerator - HepMC::GenParticle* newParticle = new HepMC::GenParticle(fourMomentum, pdgCode, status); + HepMC::GenParticlePtr newParticle = HepMC::newGenParticlePtr(fourMomentum, pdgCode, status); // This should be a *secondary* track. If it has a primary, it was a decay and // we are running with quasi-stable particle simulation. Note that if the primary @@ -330,9 +330,9 @@ HepMC::GenParticle* iGeant4::Geant4TruthIncident::convert(const G4Track *track, track->GetDynamicParticle()->GetPrimaryParticle()->GetUserInformation()){ // Then the new particle should use the same barcode as the old one!! PrimaryParticleInformation* ppi = dynamic_cast<PrimaryParticleInformation*>( track->GetDynamicParticle()->GetPrimaryParticle()->GetUserInformation() ); - newParticle->suggest_barcode( ppi->GetParticleBarcode() ); + HepMC::suggest_barcode( newParticle, ppi->GetParticleBarcode() ); } else { - newParticle->suggest_barcode( barcode ); + HepMC::suggest_barcode( newParticle, barcode ); } return newParticle; diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/src/ISFG4Helper.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/src/ISFG4Helper.cxx index 004621c581abf64161cae9b7a96c5e6bae76a73c..3858d74020fc52e5aac08182136549970a82df00 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/src/ISFG4Helper.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/src/ISFG4Helper.cxx @@ -11,6 +11,8 @@ #include "G4EventManager.hh" #include "G4Event.hh" +#include "AtlasHepMC/GenParticle.h" + // G4Atlas includes #include "MCTruth/EventInformation.h" #include "MCTruth/TrackBarcodeInfo.h" @@ -73,7 +75,7 @@ TrackInformation* iGeant4::ISFG4Helper::attachTrackInfoToNewG4Track( G4Track& aTrack, const ISF::ISFParticle& baseIsp, TrackClassification classification, - HepMC::GenParticle *nonRegeneratedTruthParticle) + HepMC::GenParticlePtr nonRegeneratedTruthParticle) { if ( aTrack.GetUserInformation() ) { G4ExceptionDescription description; diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.cxx index 76e11714b46fd92fe784d1a3df7a99b96b7ff2b6..b845ede14de0b1a4c65f8332a71487489083f7d5 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.cxx @@ -239,14 +239,14 @@ namespace G4UA{ m_scIn = creation? creation->GetProcessSubType() : -1; VTrackInformation * trackInfo= static_cast<VTrackInformation*>(track->GetUserInformation()); - HepMC::GenParticle* genpart= trackInfo ? const_cast<HepMC::GenParticle*>(trackInfo->GetHepMCParticle()):0; + HepMC::GenParticlePtr genpart= trackInfo ? const_cast<HepMC::GenParticlePtr>(trackInfo->GetHepMCParticle()):0; HepMC::GenVertex* vtx = genpart ? genpart->production_vertex() : 0; m_gen = genpart? 0 : -1; if (genpart) { // mc truth known while (genpart && vtx ) { int pdgID=genpart->pdg_id(); - HepMC::GenParticle* genmom = vtx->particles_in_size()>0 ? *(vtx->particles_in_const_begin()) : 0; + HepMC::GenParticlePtr genmom = vtx->particles_in_size()>0 ? *(vtx->particles_in_const_begin()) : 0; if ( genmom && pdgID!=genmom->pdg_id() ) m_gen++; else if (vtx->particles_out_size()>0 && genpart!=*(vtx->particles_out_const_begin())) m_gen++; vtx = genmom ? genmom->production_vertex() : 0; diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.cxx index 3bdb378bcb9ce74c849a0d414ab531ae0312e8ad..b69bec16eb8b0839392ff232d60ddc145c766e73 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.cxx @@ -93,7 +93,7 @@ void TrackProcessorUserActionBase::UserSteppingAction(const G4Step* aStep) // G4Tracks aready returned to ISF will have a TrackInformation attached to them bool particleReturnedToISF = trackInfo && trackInfo->GetReturnedToISF(); if (!particleReturnedToISF) { - HepMC::GenParticle* generationZeroTruthParticle = nullptr; + HepMC::GenParticlePtr generationZeroTruthParticle{}; ::iGeant4::ISFG4Helper::attachTrackInfoToNewG4Track( *aSecondaryTrack, *m_curBaseISP, Secondary, @@ -191,8 +191,8 @@ void TrackProcessorUserActionBase::setupSecondary(const G4Track& aTrack) auto* trackInfo = ::iGeant4::ISFG4Helper::getISFTrackInfo(aTrack); // why does TrackInformation return *const* GenParticle and ISFParticle objects!? - auto* currentlyTracedTruthParticle = const_cast<HepMC::GenParticle*>( trackInfo->GetHepMCParticle() ); - auto* primaryTruthParticle = const_cast<HepMC::GenParticle*>( trackInfo->GetPrimaryHepMCParticle() ); + HepMC::GenParticlePtr currentlyTracedTruthParticle = const_cast<HepMC::GenParticlePtr>( trackInfo->GetHepMCParticle() ); + HepMC::GenParticlePtr primaryTruthParticle = const_cast<HepMC::GenParticlePtr>( trackInfo->GetPrimaryHepMCParticle() ); auto* baseISFParticle = const_cast<ISF::ISFParticle*>( trackInfo->GetBaseISFParticle() ); setCurrentParticle(baseISFParticle, primaryTruthParticle, currentlyTracedTruthParticle); @@ -200,8 +200,8 @@ void TrackProcessorUserActionBase::setupSecondary(const G4Track& aTrack) } void TrackProcessorUserActionBase::setCurrentParticle(ISF::ISFParticle* baseISFParticle, - HepMC::GenParticle* truthPrimary, - HepMC::GenParticle* truthCurrentlyTraced) + HepMC::GenParticlePtr truthPrimary, + HepMC::GenParticlePtr truthCurrentlyTraced) { m_curBaseISP = baseISFParticle; m_eventInfo->SetCurrentPrimary( truthPrimary ); @@ -210,9 +210,9 @@ void TrackProcessorUserActionBase::setCurrentParticle(ISF::ISFParticle* baseISFP } /// Classify the particle represented by the given set of truth links -TrackClassification TrackProcessorUserActionBase::classify(const HepMC::GenParticle* primaryTruthParticle, - const HepMC::GenParticle* generationZeroTruthParticle, - const HepMC::GenParticle* currentlyTracedHepPart, +TrackClassification TrackProcessorUserActionBase::classify(HepMC::ConstGenParticlePtr primaryTruthParticle, + HepMC::ConstGenParticlePtr generationZeroTruthParticle, + HepMC::ConstGenParticlePtr currentlyTracedHepPart, int regenerationNumber) const { // if particle points to a non-zero truth particle it can not just be a 'simple' Secondary diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.h index c863ecf52383208cfa89c90ed48cc9645811129f..e5b215a382625e86a14e71b40c6142ccb209db06 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.h +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.h @@ -64,13 +64,13 @@ private: /// Set the following information as the currently traced particle void setCurrentParticle(ISF::ISFParticle* baseISFParticle, - HepMC::GenParticle* truthPrimary, - HepMC::GenParticle* truthCurrentlyTraced); + HepMC::GenParticlePtr truthPrimary, + HepMC::GenParticlePtr truthCurrentlyTraced); /// Classify the particle represented by the given set of truth links - TrackClassification classify(const HepMC::GenParticle* primaryTruthParticle, - const HepMC::GenParticle* generationZeroTruthParticle, - const HepMC::GenParticle* currentlyTracedHepPart, + TrackClassification classify(HepMC::ConstGenParticlePtr primaryTruthParticle, + HepMC::ConstGenParticlePtr generationZeroTruthParticle, + HepMC::ConstGenParticlePtr currentlyTracedHepPart, int regenerationNumber) const; /// The most recent ISFParticle ancestor that triggers the currently processed G4Track diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBack.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBack.cxx index 4495398c580a8f5f00c96dca595165b2511d2fc6..cb2774d200483c0a1819523df74c740c3851043f 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBack.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBack.cxx @@ -175,7 +175,7 @@ namespace G4UA { // " and is returned to ISF."); const ISF::ISFParticle* parent = curISP; - HepMC::GenParticle* truthParticle = m_eventInfo->GetCurrentlyTraced(); + HepMC::GenParticlePtr truthParticle = m_eventInfo->GetCurrentlyTraced(); this->returnParticleToISF(aTrack, parent, truthParticle, nextGeoID); } @@ -214,13 +214,13 @@ namespace G4UA { // attach TrackInformation instance to the new secondary G4Track const ISF::ISFParticle *parent = curISP; - HepMC::GenParticle* generationZeroTruthParticle = nullptr; + HepMC::GenParticlePtr generationZeroTruthParticle = nullptr; ::iGeant4::ISFG4Helper::attachTrackInfoToNewG4Track( *aTrack_2nd, *parent, Secondary, generationZeroTruthParticle ); - HepMC::GenParticle* truthParticle = nullptr; + HepMC::GenParticlePtr truthParticle{}; returnParticleToISF(aTrack_2nd, parent, truthParticle, nextGeoID_2nd); } } @@ -230,7 +230,7 @@ namespace G4UA { return; } - ISF::TruthBinding* TrackProcessorUserActionPassBack::newTruthBinding(const G4Track* aTrack, HepMC::GenParticle* truthParticle) const + ISF::TruthBinding* TrackProcessorUserActionPassBack::newTruthBinding(const G4Track* aTrack, HepMC::GenParticlePtr truthParticle) const { auto* trackInfo = ::iGeant4::ISFG4Helper::getISFTrackInfo(*aTrack); if (!trackInfo) { @@ -242,8 +242,8 @@ namespace G4UA { return nullptr; //The G4Exception call above should abort the job, but Coverity does not seem to pick this up. } - HepMC::GenParticle* primaryHepParticle = const_cast<HepMC::GenParticle*>(trackInfo->GetPrimaryHepMCParticle()); - HepMC::GenParticle* generationZeroHepParticle = const_cast<HepMC::GenParticle*>(trackInfo->GetHepMCParticle()); + HepMC::GenParticlePtr primaryHepParticle = const_cast<HepMC::GenParticlePtr>(trackInfo->GetPrimaryHepMCParticle()); + HepMC::GenParticlePtr generationZeroHepParticle = const_cast<HepMC::GenParticlePtr>(trackInfo->GetHepMCParticle()); ISF::TruthBinding* tBinding = new ISF::TruthBinding(truthParticle, primaryHepParticle, generationZeroHepParticle); @@ -252,7 +252,7 @@ namespace G4UA { ISF::ISFParticle* TrackProcessorUserActionPassBack::newISFParticle(G4Track* aTrack, const ISF::ISFParticle* parentISP, - HepMC::GenParticle* truthParticle, + HepMC::GenParticlePtr truthParticle, AtlasDetDescr::AtlasRegion nextGeoID) { ISF::TruthBinding* tBinding = newTruthBinding(aTrack, truthParticle); @@ -271,7 +271,7 @@ namespace G4UA { void TrackProcessorUserActionPassBack::returnParticleToISF( G4Track *aTrack, const ISF::ISFParticle* parentISP, - HepMC::GenParticle* truthParticle, + HepMC::GenParticlePtr truthParticle, AtlasDetDescr::AtlasRegion nextGeoID ) { // kill track inside G4 diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBack.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBack.h index b54d7df05f46d60309fb3dd37e9653cb145aa947..f96fd65309ee9ab933a972b4ce974df2246db3e0 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBack.h +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBack.h @@ -55,17 +55,17 @@ namespace G4UA{ Config m_config; /** create a new TruthBinding object for the given G4Track (may return 0 if unable) */ - ISF::TruthBinding* newTruthBinding(const G4Track* aTrack, HepMC::GenParticle* truthParticle) const; + ISF::TruthBinding* newTruthBinding(const G4Track* aTrack, HepMC::GenParticlePtr truthParticle) const; ISF::ISFParticle* newISFParticle(G4Track* aTrack, const ISF::ISFParticle* parent, - HepMC::GenParticle* truthParticle, + HepMC::GenParticlePtr truthParticle, AtlasDetDescr::AtlasRegion nextGeoID); /** kills the given G4Track, converts it into an ISFParticle and returns it to the ISF particle broker */ void returnParticleToISF( G4Track *aTrack, const ISF::ISFParticle *parentISP, - HepMC::GenParticle* truthParticle, + HepMC::GenParticlePtr truthParticle, AtlasDetDescr::AtlasRegion nextGeoID ); ISF::IParticleBroker *m_particleBrokerQuick; //!< quickaccess avoiding gaudi ovehead diff --git a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/src/GenParticleGenericFilter.cxx b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/src/GenParticleGenericFilter.cxx index 51531a82191cb18ca5363db4c4b6e147b2b706f5..f4a54d5845c4ca7d9078e81d47da90a3a465a8ab 100644 --- a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/src/GenParticleGenericFilter.cxx +++ b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/src/GenParticleGenericFilter.cxx @@ -85,7 +85,7 @@ bool ISF::GenParticleGenericFilter::pass(const HepMC::GenParticle& particle) con { bool pass = true; - const auto* productionVertex = particle.production_vertex(); + HepMC::ConstGenVertexPtr productionVertex = particle.production_vertex(); const auto* position = productionVertex ? &productionVertex->position() : nullptr; if (!position || position->perp()<=m_maxApplicableRadius) { pass = check_cuts_passed(particle); diff --git a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/src/GenParticlePositionFilter.cxx b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/src/GenParticlePositionFilter.cxx index 2dbbb15df18a9f255b05f3e956eeff71cc0d4008..597933ec224e891d99c7fe75bb8bc64755828033 100644 --- a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/src/GenParticlePositionFilter.cxx +++ b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/src/GenParticlePositionFilter.cxx @@ -51,7 +51,7 @@ StatusCode ISF::GenParticlePositionFilter::initialize() bool ISF::GenParticlePositionFilter::pass(const HepMC::GenParticle& particle) const { // the GenParticle production vertex - HepMC::GenVertex* vtx = particle.production_vertex(); + HepMC::GenVertexPtr vtx = particle.production_vertex(); // no production vertex? if (!vtx) { diff --git a/Simulation/ISF/ISF_SimulationSelectors/src/ConeSimSelector.cxx b/Simulation/ISF/ISF_SimulationSelectors/src/ConeSimSelector.cxx index eb164b1b07d570abcb03c2d97a02c97d88e4a63a..d298c9de756c187a313b25b030c14985838878a8 100644 --- a/Simulation/ISF/ISF_SimulationSelectors/src/ConeSimSelector.cxx +++ b/Simulation/ISF/ISF_SimulationSelectors/src/ConeSimSelector.cxx @@ -134,7 +134,7 @@ void ISF::ConeSimSelector::update(const ISFParticle& particle) if (truth) { // get GenParticle from truth binding - const HepMC::GenParticle* genParticle = truth->getTruthParticle(); + HepMC::ConstGenParticlePtr genParticle = truth->getTruthParticle(); if (!genParticle) { // cone conditions not fulfilled @@ -142,13 +142,13 @@ void ISF::ConeSimSelector::update(const ISFParticle& particle) } // test whether any of the pdg codes is found in the genParticle history - const HepMC::GenParticle *relative = HepMCHelper::findRealtiveWithPDG( *genParticle, m_relation, m_relatives); + HepMC::ConstGenParticlePtr relative = HepMCHelper::findRealtiveWithPDG( *genParticle, m_relation, m_relatives); if (relative) { ATH_MSG_VERBOSE("Current particle has valid relative particle:" << " (pdg=" << relative->pdg_id() << "," - << " barcode=" << relative->barcode() << ")." + << " barcode=" << HepMC::barcode(relative) << ")." << " Will now check whether cone cuts apply" ); } else diff --git a/Simulation/ISF/ISF_SimulationSelectors/src/TruthAssocSimSelector.cxx b/Simulation/ISF/ISF_SimulationSelectors/src/TruthAssocSimSelector.cxx index ac71596f11434ec1cde211d2e43c38b08bcded16..4bf6af110ea8935baa3c1501977481db28c3f91c 100644 --- a/Simulation/ISF/ISF_SimulationSelectors/src/TruthAssocSimSelector.cxx +++ b/Simulation/ISF/ISF_SimulationSelectors/src/TruthAssocSimSelector.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -69,11 +69,11 @@ bool ISF::TruthAssocSimSelector::passSelectorCuts(const ISFParticle& particle) if (truth) { // get GenParticle from truth binding - const HepMC::GenParticle* genParticle = truth->getTruthParticle(); + HepMC::ConstGenParticlePtr genParticle = truth->getTruthParticle(); if (genParticle) { // test whether any of the pdg codes is found in the genParticle history - const HepMC::GenParticle* relative = HepMCHelper::findRealtiveWithPDG( *genParticle, m_relation, m_relatives); + HepMC::ConstGenParticlePtr relative = HepMCHelper::findRealtiveWithPDG( *genParticle, m_relation, m_relatives); // in case a relative was found if (relative) { @@ -84,7 +84,7 @@ bool ISF::TruthAssocSimSelector::passSelectorCuts(const ISFParticle& particle) << " barcode=" << particle.barcode() << ")" << " passes due relative particle" << " (pdg=" << relative->pdg_id() << "," - << " barcode=" << relative->barcode() << ")" ); + << " barcode=" << HepMC::barcode(*relative) << ")" ); // selector cuts passed return true; } // found relative diff --git a/Simulation/Tools/McEventCollectionFilter/src/McEventCollectionFilter.cxx b/Simulation/Tools/McEventCollectionFilter/src/McEventCollectionFilter.cxx index 0f100552ce32e55b6557bf30862dfdf82a6f7ce0..0a6c9a1f712101a60a4c8446f66edcaf48ba89df 100644 --- a/Simulation/Tools/McEventCollectionFilter/src/McEventCollectionFilter.cxx +++ b/Simulation/Tools/McEventCollectionFilter/src/McEventCollectionFilter.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ ////////////////////////////////////////////////////////////////////////// @@ -176,12 +176,12 @@ StatusCode McEventCollectionFilter::ReduceMCEventCollection(){ if (!m_outputTruthCollection.isValid()) m_outputTruthCollection = std::make_unique<McEventCollection>(); //.......Create new particle (geantino) to link hits from pileup - HepMC::GenParticle* genPart=new HepMC::GenParticle(); + HepMC::GenParticlePtr genPart=HepMC::newGenParticlePtr(); genPart->set_pdg_id(m_PileupPartPDGID); //Geantino genPart->set_status(1); //!< set decay status - genPart->suggest_barcode( std::numeric_limits<int32_t>::max() ); + HepMC::suggest_barcode(genPart, std::numeric_limits<int32_t>::max() ); - HepMC::GenVertex* genVertex=new HepMC::GenVertex(); + HepMC::GenVertexPtr genVertex = HepMC::newGenVertexPtr(); genVertex->add_particle_out(genPart); const HepMC::GenEvent* genEvt = *(m_inputTruthCollection->begin()); @@ -191,7 +191,7 @@ StatusCode McEventCollectionFilter::ReduceMCEventCollection(){ //to set geantino vertex as a truth primary vertex - HepMC::GenVertex* hScatVx = genEvt->barcode_to_vertex(-3); + HepMC::GenVertexPtr hScatVx = genEvt->barcode_to_vertex(-3); if(hScatVx!=nullptr) { HepMC::FourVector pmvxpos=hScatVx->position(); genVertex->set_position(pmvxpos); @@ -211,33 +211,29 @@ StatusCode McEventCollectionFilter::ReduceMCEventCollection(){ } if(!evt->vertices_empty()){ - std::vector<HepMC::GenVertex *> vtxvec; HepMC::GenEvent::vertex_iterator itvtx = evt->vertices_begin(); for (;itvtx != evt ->vertices_end(); ++itvtx ) { - evt->remove_vertex(*itvtx); - vtxvec.push_back((*itvtx)); - //fix me: delete vertex pointer causes crash - //delete (*itvtx); + HepMC::GenVertexPtr vtx = *itvtx++; + evt->remove_vertex(vtx); + delete vtx; } - for(unsigned int i=0;i<vtxvec.size();i++) delete vtxvec[i]; } //-------------------------------------- if(m_IsKeepTRTElect){ for(int i=0;i<(int) m_elecBarcode.size();i++){ - HepMC::GenParticle* thePart=genEvt->barcode_to_particle(m_elecBarcode[i]); + HepMC::GenParticlePtr thePart=genEvt->barcode_to_particle(m_elecBarcode[i]); if (!thePart){ ATH_MSG_DEBUG( "Could not find particle for barcode " << m_elecBarcode[i] ); continue; } - const HepMC::GenVertex* vx = thePart->production_vertex(); - HepMC::GenParticle* thePart_new=new HepMC::GenParticle( thePart->momentum(),thePart->pdg_id(), - thePart->status(),thePart->flow(), - thePart->polarization() ); - thePart_new->suggest_barcode(m_elecBarcode[i]); + HepMC::ConstGenVertexPtr vx = thePart->production_vertex(); + HepMC::GenParticlePtr thePart_new = HepMC::newGenParticlePtr( thePart->momentum(),thePart->pdg_id(), + thePart->status()); + HepMC::suggest_barcode(thePart_new, m_elecBarcode[i]); HepMC::FourVector pos= vx->position(); - HepMC::GenVertex* vx_new=new HepMC::GenVertex(pos); + HepMC::GenVertexPtr vx_new = HepMC::newGenVertexPtr(pos); vx_new->add_particle_out(thePart_new); evt->add_vertex(vx_new); } @@ -245,7 +241,7 @@ StatusCode McEventCollectionFilter::ReduceMCEventCollection(){ //.....add new vertex with geantino evt->add_vertex(genVertex); - m_RefBarcode=genPart->barcode(); + m_RefBarcode=HepMC::barcode(*genPart); m_outputTruthCollection->push_back(evt); diff --git a/Simulation/TruthJiveXML/src/TruthTrackRetriever.cxx b/Simulation/TruthJiveXML/src/TruthTrackRetriever.cxx index c73ae7f145a72b1731453e51dd26bd7a0ec61920..e924de32f0911240f10a864d5540c2232ccecf61 100755 --- a/Simulation/TruthJiveXML/src/TruthTrackRetriever.cxx +++ b/Simulation/TruthJiveXML/src/TruthTrackRetriever.cxx @@ -108,7 +108,7 @@ namespace JiveXML { phi.push_back(DataType( (thePhi<0) ? thePhi+=2*M_PI : thePhi )); eta.push_back(DataType( particle->momentum().pseudoRapidity() )); code.push_back(DataType( particle->pdg_id() )); - id.push_back(DataType( particle->barcode() )); + id.push_back(DataType( HepMC::barcode(*particle) )); // Get the vertex information auto vertex = particle->production_vertex(); diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigFastTrackFinder/CMakeLists.txt index 092618f1f8ec802b58c3147420e7e184e83a6da5..eb8283551736d80ee59ce2d56aa32c43e80d1f6d 100644 --- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/CMakeLists.txt @@ -1,52 +1,13 @@ -################################################################################ -# Package: TrigFastTrackFinder -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigFastTrackFinder ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - GaudiKernel - Tracking/TrkEvent/TrkEventPrimitives - Trigger/TrigEvent/TrigInDetEvent - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigSteer/TrigInterfaces - Trigger/TrigTools/TrigInDetPattRecoTools - - PRIVATE - Control/AthenaBaseComps - Control/CxxUtils - Control/StoreGate - Control/AthenaMonitoringKernel - DetectorDescription/IRegionSelector - InnerDetector/InDetDetDescr/InDetIdentifier - InnerDetector/InDetRecEvent/InDetPrepRawData - InnerDetector/InDetConditions/BeamSpotConditionsData - InnerDetector/InDetRecEvent/InDetRIO_OnTrack - InnerDetector/InDetRecEvent/SiSpacePointsSeed - InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData - InnerDetector/InDetRecTools/InDetRecToolInterfaces - Tracking/TrkEvent/TrkParameters - Tracking/TrkEvent/TrkRIO_OnTrack - Tracking/TrkEvent/TrkTrack - Tracking/TrkEvent/TrkTrackSummary - Tracking/TrkTools/TrkToolInterfaces - Tracking/TrkEvent/TrkEventUtils - Trigger/TrigEvent/TrigInDetPattRecoEvent - Trigger/TrigTools/TrigInDetToolInterfaces - Trigger/TrigTools/TrigTimeAlgs ) - -# External dependencies: -find_package( TBB ) - # Component(s) in the package: atlas_add_component( TrigFastTrackFinder src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${TBB_INCLUDE_DIRS} - LINK_LIBRARIES ${TBB_LIBRARIES} GaudiKernel TrkEventPrimitives TrigInDetEvent TrigSteeringEvent TrigInterfacesLib TrigInDetPattRecoTools AthenaBaseComps IRegionSelector InDetIdentifier InDetPrepRawData InDetRIO_OnTrack SiSpacePointsSeed SiSPSeededTrackFinderData InDetRecToolInterfaces TrkParameters TrkRIO_OnTrack TrkTrack TrkTrackSummary TrkToolInterfaces TrigInDetPattRecoEvent TrigTimeAlgsLib TrkEventUtils AthenaMonitoringKernelLib) + LINK_LIBRARIES AthenaBaseComps AthenaMonitoringKernelLib BeamSpotConditionsData CxxUtils GaudiKernel InDetIdentifier InDetPrepRawData InDetRIO_OnTrack InDetRecToolInterfaces SiSPSeededTrackFinderData SiSpacePointsSeed TrigInDetEvent TrigInDetPattRecoEvent TrigInDetPattRecoTools TrigInDetToolInterfacesLib TrigInterfacesLib TrigNavigationLib TrigSteeringEvent TrigTimeAlgsLib TrkEventPrimitives TrkEventUtils TrkParameters TrkRIO_OnTrack TrkToolInterfaces TrkTrack TrkTrackSummary ) # Install files from the package: -atlas_install_python_modules( python/*.py ) - +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py index 347af0cea78ae12ec2fb9d0c9c2474d4be23e4c7..d58a6beba186f69cecfb59f7535eb8707fb2d860 100755 --- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py +++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py @@ -171,7 +171,7 @@ class TrigFastTrackFinderBase(TrigFastTrackFinder): assert(remapped_type is not None) #Global keys/names for collections - from TrigInDetConfig.InDetTrigCollectionKeys import TrigTRTKeys, TrigPixelKeys, TrigSCTKeys + from TrigInDetConfig.InDetTrigCollectionKeys import TrigPixelKeys, TrigSCTKeys self.useNewLayerNumberScheme = True diff --git a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/CMakeLists.txt index cfb045f36ab71b60aa337173bf78c4f2dc45df46..467995895baae5d9903427a4160b02b18f2995be 100644 --- a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/CMakeLists.txt @@ -1,45 +1,13 @@ -################################################################################ -# Package: TrigL2LongLivedParticles -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigL2LongLivedParticles ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Event/xAOD/xAODTrigger - Trigger/TrigEvent/TrigMuonEvent - Trigger/TrigSteer/TrigInterfaces - Trigger/TrigT1/TrigT1Interfaces - Trigger/TrigTools/TrigTimeAlgs - PRIVATE - Calorimeter/CaloEvent - Control/AthContainers - Control/CxxUtils - Event/FourMomUtils - Event/xAOD/xAODJet - Event/xAOD/xAODTracking - GaudiKernel - Reconstruction/Jet/JetEvent - Tools/PathResolver - Trigger/TrigEvent/TrigCaloEvent - Trigger/TrigEvent/TrigNavigation - Trigger/TrigEvent/TrigParticle - Trigger/TrigEvent/TrigSteeringEvent ) - -# External dependencies: -find_package( CLHEP ) -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint ) - # Component(s) in the package: atlas_add_component( TrigL2LongLivedParticles src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} xAODTrigger TrigMuonEvent TrigInterfacesLib TrigT1Interfaces TrigTimeAlgsLib CaloEvent AthContainers CxxUtils FourMomUtils xAODJet xAODTracking GaudiKernel JetEvent PathResolver TrigCaloEvent TrigNavigationLib TrigParticle TrigSteeringEvent ) + LINK_LIBRARIES AthContainers CaloEvent CxxUtils FourMomUtils GaudiKernel JetEvent PathResolver TrigInterfacesLib TrigNavigationLib TrigParticle TrigSteeringEvent TrigT1Interfaces TrigTimeAlgsLib xAODJet xAODTracking xAODTrigger ) # Install files from the package: -atlas_install_headers( TrigL2LongLivedParticles ) -atlas_install_python_modules( python/*.py ) -atlas_install_joboptions( share/*.py ) - +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) diff --git a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/python/TrigL2LongLivedParticlesConfig.py b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/python/TrigL2LongLivedParticlesConfig.py index 46f59b7efee1534260617daf81882b449c1e0dab..af66f7f55363ccbe928a8513e32145044848a529 100755 --- a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/python/TrigL2LongLivedParticlesConfig.py +++ b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/python/TrigL2LongLivedParticlesConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from TrigL2LongLivedParticles.TrigL2LongLivedParticlesConf import MuonCluster from TrigL2LongLivedParticles.TrigL2LongLivedParticlesConf import MuonClusterIsolation @@ -6,9 +6,6 @@ from TrigL2LongLivedParticles.TrigL2LongLivedParticlesConf import TrigMuonJetFex from TrigL2LongLivedParticles.TrigL2LongLivedParticlesConf import TrigJetSplitter from TrigL2LongLivedParticles.TrigL2LongLivedParticlesConf import TrigBHremoval -from AthenaCommon.GlobalFlags import globalflags -from AthenaCommon.AppMgr import ServiceMgr - def getJetSplitterInstance( instance, logratio, pufixlogratio ): diff --git a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/share/MuClusterJobOption.py b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/share/MuClusterJobOption.py deleted file mode 100644 index e7eb759de9bbc549d3bf40577101c127b8d09b04..0000000000000000000000000000000000000000 --- a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/share/MuClusterJobOption.py +++ /dev/null @@ -1,14 +0,0 @@ -#---------------------------------------------------- -# MuCluster options -#---------------------------------------------------- -# Timing service libs. -theApp.Dlls += [ "TrigTimeAlgs" ] -theApp.ExtSvc += [ "TrigTimeSvc" ] - -# Algorithm -theApp.Dlls += [ "TrigMuCluster" ] - - -# Timer service conf. -TrigTimerSvc = Service ( "TrigTimerSvc" ) -TrigTimerSvc.OutputLevel = 3 diff --git a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/share/jobOfragment_TrigMuCluster.py b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/share/jobOfragment_TrigMuCluster.py deleted file mode 100644 index 54aee5fa63865d49a77458d705c18da8f2f1dba7..0000000000000000000000000000000000000000 --- a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/share/jobOfragment_TrigMuCluster.py +++ /dev/null @@ -1,13 +0,0 @@ -#---------------------------------------------------- -# MuCluster options -#---------------------------------------------------- -# Timing service libs. -theApp.Dlls += [ "TrigTimeAlgs" ] -theApp.ExtSvc += [ "TrigTimeSvc" ] - -# Algorithm -theApp.Dlls += [ "TrigiMuCluster" ] - -# Timer service conf. -TrigTimerSvc = Service ( "TrigTimerSvc" ) -TrigTimerSvc.OutputLevel = 3 diff --git a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/src/MuonCluster.cxx b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/src/MuonCluster.cxx index 1c7a2cf2ab782d8e461a42ea9052192a07f57c65..3e605656681724677abbe54c23ce2a8e06dadd65 100644 --- a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/src/MuonCluster.cxx +++ b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/src/MuonCluster.cxx @@ -1,16 +1,14 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /* MuonCluster.cxx Muon cluster finding, creates an RoI cluster for track finding */ -#include "TMath.h" #include <cmath> #include <algorithm> #include <sstream> -#include "CLHEP/Units/SystemOfUnits.h" #include "GaudiKernel/ITHistSvc.h" #include "PathResolver/PathResolver.h" #include "TrigInterfaces/FexAlgo.h" diff --git a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/src/MuonClusterIsolation.cxx b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/src/MuonClusterIsolation.cxx index d8d08fc90254ce5d7bcf78525119d74311a98ab3..f8c9b74554037437eb68096f4683d660cc73bece 100644 --- a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/src/MuonClusterIsolation.cxx +++ b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/src/MuonClusterIsolation.cxx @@ -1,15 +1,13 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /* MuonClusterIsolation.cxx */ -#include "TMath.h" #include <cmath> #include <algorithm> #include <sstream> -#include "CLHEP/Units/SystemOfUnits.h" #include "GaudiKernel/ITHistSvc.h" #include "PathResolver/PathResolver.h" #include "TrigInterfaces/FexAlgo.h" @@ -308,7 +306,7 @@ HLT::ErrorCode MuonClusterIsolation::hltExecute(std::vector<std::vector<HLT::Tri for(; track !=lasttrack; track++ ) { - float pT = fabs(TMath::Sin((*track)->theta())/(*track)->qOverP()); + float pT = fabs(std::sin((*track)->theta())/(*track)->qOverP()); if ( pT <= m_PtMinID) continue; double eta = (*track)->eta(); diff --git a/Trigger/TrigAlgorithms/TrigL2MissingET/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigL2MissingET/CMakeLists.txt index 91ba6d7c2e0514c69e183fe31dfa503800468235..e274321db3c371fb652c90b633cc5bb74f4e493c 100644 --- a/Trigger/TrigAlgorithms/TrigL2MissingET/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigL2MissingET/CMakeLists.txt @@ -1,39 +1,16 @@ -################################################################################ -# Package: TrigL2MissingET -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigL2MissingET ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PRIVATE - Calorimeter/CaloIdentifier - DetectorDescription/IRegionSelector - Event/xAOD/xAODTrigMissingET - GaudiKernel - LArCalorimeter/LArIdentifier - LArCalorimeter/LArRecEvent - LArCalorimeter/LArCabling - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigSteer/TrigInterfaces - Control/CxxUtils - Event/xAOD/xAODEventInfo - Trigger/TrigAlgorithms/TrigT2CaloCommon - Trigger/TrigEvent/TrigCaloEvent - Trigger/TrigEvent/TrigMissingEtEvent - Trigger/TrigEvent/TrigNavigation - Trigger/TrigT1/TrigT1Interfaces ) - # External dependencies: -find_package( CLHEP ) find_package( tdaq-common ) # Component(s) in the package: atlas_add_component( TrigL2MissingET src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier IRegionSelector xAODTrigMissingET GaudiKernel LArIdentifier LArRecEvent LArCablingLib TrigSteeringEvent TrigInterfacesLib CxxUtils xAODEventInfo TrigT2CaloCommonLib TrigCaloEvent TrigMissingEtEvent TrigNavigationLib TrigT1Interfaces ) + INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} + LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} CaloIdentifier CxxUtils GaudiKernel IRegionSelector LArCablingLib LArIdentifier LArRecConditions LArRecEvent StoreGateLib TrigInterfacesLib TrigMissingEtEvent TrigNavigationLib TrigSteeringEvent TrigT1Interfaces TrigT2CaloCommonLib TrigTimeAlgsLib xAODEventInfo xAODTrigMissingET ) # Install files from the package: -atlas_install_python_modules( python/*.py ) - +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) diff --git a/Trigger/TrigAlgorithms/TrigL2MissingET/python/TrigL2MissingETMonitoring.py b/Trigger/TrigAlgorithms/TrigL2MissingET/python/TrigL2MissingETMonitoring.py index f68a012d5183427364c27e6b8ee242a7f20d5974..c29f0f65a56e1715ebac8504f7e7d567413f7587 100755 --- a/Trigger/TrigAlgorithms/TrigL2MissingET/python/TrigL2MissingETMonitoring.py +++ b/Trigger/TrigAlgorithms/TrigL2MissingET/python/TrigL2MissingETMonitoring.py @@ -1,7 +1,8 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration ################# Validation, DQ checks from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig +from builtins import range bitNames = [ "ErrParityL1", # bit 0 "ErrL1mult", # bit 1 @@ -88,7 +89,7 @@ class T2CaloMissingETOnlineMonitoring(TrigGenericMonitoringToolConfig): label_lbc='' label_eba='' label_ebc='' - for i in xrange(64): + for i in range(64): if i==63 : label_la = '%(b)s%(n)02d' % {'b':'LBA', 'n':(i+1)} label_lc = '%(b)s%(n)02d' % {'b':'LBC', 'n':(i+1)} @@ -121,7 +122,7 @@ class T2CaloMissingETValidationMonitoring(TrigGenericMonitoringToolConfig): label_lbc='' label_eba='' label_ebc='' - for i in xrange(64): + for i in range(64): if i==63 : label_la = '%(b)s%(n)02d' % {'b':'LBA', 'n':(i+1)} label_lc = '%(b)s%(n)02d' % {'b':'LBC', 'n':(i+1)} diff --git a/Trigger/TrigAlgorithms/TrigL2MissingET/src/T2MissingET.cxx b/Trigger/TrigAlgorithms/TrigL2MissingET/src/T2MissingET.cxx index a530a7cf1f47b439271e756a411a3ef8cb136607..9257d0daf1225c7daca3ca0741d1dd68eb580335 100755 --- a/Trigger/TrigAlgorithms/TrigL2MissingET/src/T2MissingET.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MissingET/src/T2MissingET.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // ******************************************************************** @@ -15,7 +15,6 @@ // ******************************************************************** #include "T2MissingET.h" -#include "CLHEP/Units/SystemOfUnits.h" #include "TrigT1Interfaces/RecEnergyRoI.h" #include "TrigSteeringEvent/Enums.h" #include "TrigMissingEtEvent/TrigMissingET.h" diff --git a/Trigger/TrigAlgorithms/TrigMinBias/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigMinBias/CMakeLists.txt index 9d084ae94d29c74d0de61a345fbe229d622d9d88..67c066a1c687a23628c24d8fda10a7a04aec125f 100644 --- a/Trigger/TrigAlgorithms/TrigMinBias/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigMinBias/CMakeLists.txt @@ -1,32 +1,12 @@ -################################################################################ -# Package: TrigMinBias -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigMinBias ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PRIVATE - Event/xAOD/xAODTracking - Event/xAOD/xAODTrigMinBias - Tracking/TrkEvent/TrkTrack - Trigger/TrigEvent/TrigInDetEvent - Trigger/TrigSteer/TrigInterfaces - Trigger/TrigSteer/DecisionHandling - Trigger/TrigSteer/TrigCompositeUtils - Control/StoreGate - GaudiKernel - Tracking/TrkEvent/TrkParameters - Trigger/TrigTools/TrigTimeAlgs - Event/xAOD/xAODTrigger - Control/AthenaMonitoringKernel - Control/AthViews) - # Component(s) in the package: atlas_add_component( TrigMinBias src/*.cxx src/components/*.cxx - - LINK_LIBRARIES DecisionHandlingLib AthenaMonitoringKernelLib xAODTracking xAODTrigMinBias TrkTrack TrigInDetEvent TrigInterfacesLib StoreGateLib GaudiKernel TrkParameters TrigTimeAlgsLib AthViews TrigCompositeUtilsLib) + LINK_LIBRARIES AthViews AthenaBaseComps AthenaMonitoringKernelLib DecisionHandlingLib GaudiKernel TrigCompositeUtilsLib TrigInterfacesLib TrigTimeAlgsLib TrkParameters TrkTrack xAODTracking xAODTrigMinBias xAODTrigger ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) diff --git a/Trigger/TrigAlgorithms/TrigMinBias/python/TrigMinBiasProperties.py b/Trigger/TrigAlgorithms/TrigMinBias/python/TrigMinBiasProperties.py index 01a00dff4244fe4252122ffa616d9805352207e0..eb9c37eb12c52a0bf2e2abab8c6249d6df5f7727 100644 --- a/Trigger/TrigAlgorithms/TrigMinBias/python/TrigMinBiasProperties.py +++ b/Trigger/TrigAlgorithms/TrigMinBias/python/TrigMinBiasProperties.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration ## ## @file Trigger/TrigAlgorithms/TrigMinBias/python/TrigMinBiasProperties.py @@ -19,7 +19,6 @@ __all__ = [ "trigMinBiasProperties" ] ## Import from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer -from AthenaCommon.JobProperties import jobproperties ##----------------------------------------------------------------------------- ## 1st step: define JobProperty classes @@ -102,8 +101,8 @@ log = logging.getLogger( 'TrigMinBiasProperties.py' ) try: from TriggerMenu import useNewTriggerMenu useNewTM = useNewTriggerMenu() - log.info("Using new TriggerMenu: %r" % useNewTM) -except: + log.info("Using new TriggerMenu: %r", useNewTM) +except Exception: useNewTM = False log.info("Using old TriggerMenuPython since TriggerMenu.useNewTriggerMenu can't be imported") diff --git a/Trigger/TrigAlgorithms/TrigMissingETMuon/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigMissingETMuon/CMakeLists.txt index 46abb9ca2a08efb9cfb55e73043a2f3c4b15ac1e..948fbc3cc95c48ca2a181e89849326d4dd7e345e 100644 --- a/Trigger/TrigAlgorithms/TrigMissingETMuon/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigMissingETMuon/CMakeLists.txt @@ -1,34 +1,16 @@ -################################################################################ -# Package: TrigMissingETMuon -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigMissingETMuon ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PRIVATE - Event/xAOD/xAODTrigMissingET - Trigger/TrigSteer/TrigInterfaces - Control/CxxUtils - Event/EventInfo - Event/xAOD/xAODMuon - GaudiKernel - Trigger/TrigEvent/TrigMissingEtEvent - Trigger/TrigEvent/TrigMuonEvent - Trigger/TrigEvent/TrigNavigation - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigT1/TrigT1Interfaces ) - # External dependencies: -find_package( CLHEP ) find_package( tdaq-common ) # Component(s) in the package: atlas_add_component( TrigMissingETMuon src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ${CLHEP_LIBRARIES} xAODTrigMissingET TrigInterfacesLib CxxUtils EventInfo xAODMuon GaudiKernel TrigMissingEtEvent TrigMuonEvent TrigNavigationLib TrigSteeringEvent TrigT1Interfaces ) + INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} + LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} CxxUtils EventInfo GaudiKernel TrigInterfacesLib TrigMissingEtEvent TrigNavigationLib TrigSteeringEvent TrigT1Interfaces xAODMuon xAODTrigMissingET ) # Install files from the package: -atlas_install_python_modules( python/*.py ) - +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) diff --git a/Trigger/TrigAlgorithms/TrigMissingETMuon/python/TrigMissingETMuonConfig.py b/Trigger/TrigAlgorithms/TrigMissingETMuon/python/TrigMissingETMuonConfig.py index b88f30a9afbbc70cc78790b7f6e691ce1b76c4f3..4eb55c3e653cddc3f9426ad469d8f997c99b7272 100755 --- a/Trigger/TrigAlgorithms/TrigMissingETMuon/python/TrigMissingETMuonConfig.py +++ b/Trigger/TrigAlgorithms/TrigMissingETMuon/python/TrigMissingETMuonConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from TrigMissingETMuon.TrigMissingETMuonConf import TrigMissingETMuon @@ -11,11 +11,6 @@ class L2TrigMissingETMuon_Fex ( TrigMissingETMuon ) : self.METLabel = "T2MissingET" #self.MuonPtCut = 5.0 - # monitoring part. To switch off do in topOption TriggerFlags.enableMonitoring = [] - from TrigMissingETMuon.TrigMissingETMuonMonitoring import TrigMissingETMuonOnlineMonitoring, TrigMissingETMuonCosmicMonitoring, TrigMissingETMuonValidationMonitoring - validation = TrigMissingETMuonValidationMonitoring() - online = TrigMissingETMuonOnlineMonitoring() - cosmic = TrigMissingETMuonCosmicMonitoring() from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig time = TrigTimeHistToolConfig("Time") @@ -28,11 +23,6 @@ class L2CaloTrigMissingETMuon_Fex ( TrigMissingETMuon ) : self.METLabel = "L2MissingET_FEB" #self.MuonPtCut = 5.0 - # monitoring part. To switch off do in topOption TriggerFlags.enableMonitoring = [] - from TrigMissingETMuon.TrigMissingETMuonMonitoring import TrigMissingETMuonOnlineMonitoring, TrigMissingETMuonCosmicMonitoring, TrigMissingETMuonValidationMonitoring - validation = TrigMissingETMuonValidationMonitoring() - online = TrigMissingETMuonOnlineMonitoring() - cosmic = TrigMissingETMuonCosmicMonitoring() from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig time = TrigTimeHistToolConfig("Time") @@ -46,11 +36,6 @@ class EFTrigMissingETMuon_Fex ( TrigMissingETMuon ) : self.METLabel = "TrigEFMissingET" #self.MuonPtCut = 5.0 - # monitoring part. To switch off do in topOption TriggerFlags.enableMonitoring = [] - from TrigMissingETMuon.TrigMissingETMuonMonitoring import TrigMissingETMuonOnlineMonitoring, TrigMissingETMuonCosmicMonitoring, TrigMissingETMuonValidationMonitoring - validation = TrigMissingETMuonValidationMonitoring() - online = TrigMissingETMuonOnlineMonitoring() - cosmic = TrigMissingETMuonCosmicMonitoring() from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig time = TrigTimeHistToolConfig("Time") @@ -63,11 +48,6 @@ class EFTrigMissingETMuon_Fex_FEB ( TrigMissingETMuon ) : self.METLabel = "TrigEFMissingET_FEB" #self.MuonPtCut = 5.0 - # monitoring part. To switch off do in topOption TriggerFlags.enableMonitoring = [] - from TrigMissingETMuon.TrigMissingETMuonMonitoring import TrigMissingETMuonOnlineMonitoring, TrigMissingETMuonCosmicMonitoring, TrigMissingETMuonValidationMonitoring - validation = TrigMissingETMuonValidationMonitoring() - online = TrigMissingETMuonOnlineMonitoring() - cosmic = TrigMissingETMuonCosmicMonitoring() from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig time = TrigTimeHistToolConfig("Time") @@ -80,11 +60,6 @@ class EFTrigMissingETMuon_Fex_topocl ( TrigMissingETMuon ) : self.METLabel = "TrigEFMissingET_topocl" #self.MuonPtCut = 5.0 - # monitoring part. To switch off do in topOption TriggerFlags.enableMonitoring = [] - from TrigMissingETMuon.TrigMissingETMuonMonitoring import TrigMissingETMuonOnlineMonitoring, TrigMissingETMuonCosmicMonitoring, TrigMissingETMuonValidationMonitoring - validation = TrigMissingETMuonValidationMonitoring() - online = TrigMissingETMuonOnlineMonitoring() - cosmic = TrigMissingETMuonCosmicMonitoring() from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig time = TrigTimeHistToolConfig("Time") @@ -97,11 +72,6 @@ class EFTrigMissingETMuon_Fex_topoclPS ( TrigMissingETMuon ) : self.METLabel = "TrigEFMissingET_topocl_PS" #self.MuonPtCut = 5.0 - # monitoring part. To switch off do in topOption TriggerFlags.enableMonitoring = [] - from TrigMissingETMuon.TrigMissingETMuonMonitoring import TrigMissingETMuonOnlineMonitoring, TrigMissingETMuonCosmicMonitoring, TrigMissingETMuonValidationMonitoring - validation = TrigMissingETMuonValidationMonitoring() - online = TrigMissingETMuonOnlineMonitoring() - cosmic = TrigMissingETMuonCosmicMonitoring() from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig time = TrigTimeHistToolConfig("Time") @@ -115,11 +85,6 @@ class EFTrigMissingETMuon_Fex_Jets ( TrigMissingETMuon ) : self.METLabel = "TrigEFMissingET_Jets" #self.MuonPtCut = 5.0 - # monitoring part. To switch off do in topOption TriggerFlags.enableMonitoring = [] - from TrigMissingETMuon.TrigMissingETMuonMonitoring import TrigMissingETMuonOnlineMonitoring, TrigMissingETMuonCosmicMonitoring, TrigMissingETMuonValidationMonitoring - validation = TrigMissingETMuonValidationMonitoring() - online = TrigMissingETMuonOnlineMonitoring() - cosmic = TrigMissingETMuonCosmicMonitoring() from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig time = TrigTimeHistToolConfig("Time") @@ -132,11 +97,6 @@ class EFTrigMissingETMuon_Fex_topoclPUC ( TrigMissingETMuon ) : self.METLabel = "TrigEFMissingET_topocl_PUC" #self.MuonPtCut = 5.0 - # monitoring part. To switch off do in topOption TriggerFlags.enableMonitoring = [] - from TrigMissingETMuon.TrigMissingETMuonMonitoring import TrigMissingETMuonOnlineMonitoring, TrigMissingETMuonCosmicMonitoring, TrigMissingETMuonValidationMonitoring - validation = TrigMissingETMuonValidationMonitoring() - online = TrigMissingETMuonOnlineMonitoring() - cosmic = TrigMissingETMuonCosmicMonitoring() from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig time = TrigTimeHistToolConfig("Time") diff --git a/Trigger/TrigAlgorithms/TrigMissingETMuon/src/TrigMissingETMuon.cxx b/Trigger/TrigAlgorithms/TrigMissingETMuon/src/TrigMissingETMuon.cxx index 944ac677b921740ae71cb7f0146201e3c4ba9a33..145b103191a5bba4e1c919eb1655ef7c2c15c923 100755 --- a/Trigger/TrigAlgorithms/TrigMissingETMuon/src/TrigMissingETMuon.cxx +++ b/Trigger/TrigAlgorithms/TrigMissingETMuon/src/TrigMissingETMuon.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // ******************************************************************** @@ -22,7 +22,7 @@ #include "xAODMuon/MuonContainer.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GaudiKernel/SystemOfUnits.h" #include "TrigT1Interfaces/RecEnergyRoI.h" #include "TrigSteeringEvent/Enums.h" #include "TrigMissingEtEvent/TrigMissingET.h" @@ -215,7 +215,7 @@ HLT::ErrorCode TrigMissingETMuon::hltExecute(std::vector<std::vector<HLT::Trigge // Minimum pt cut float Et = fabs(muon->pt()); - if (Et/CLHEP::GeV < m_muonptcut) continue; + if (Et/Gaudi::Units::GeV < m_muonptcut) continue; // Reject muons without IDtracks const xAOD::TrackParticle* idtrk = muon->trackParticle( xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle ); diff --git a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/CMakeLists.txt index 5928d8088d20762f62f203db2a7823ce5062c915..ebdfbd90da319ee0ff12ca206e4874ce4125a524 100644 --- a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/CMakeLists.txt @@ -1,30 +1,18 @@ -################################################################################ -# Package: TrigPartialEventBuilding -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name atlas_subdir( TrigPartialEventBuilding ) -# Declare the package's dependencies -atlas_depends_on_subdirs( PUBLIC - Trigger/TrigSteer/DecisionHandling - Trigger/TrigSteer/TrigCompositeUtils - Trigger/TrigEvent/TrigSteeringEvent - PRIVATE - Control/CxxUtils ) - # Component(s) in the package atlas_add_library( TrigPartialEventBuildingLib src/*.cxx PUBLIC_HEADERS TrigPartialEventBuilding - LINK_LIBRARIES DecisionHandlingLib TrigSteeringEvent TrigCompositeUtilsLib ) + PRIVATE_LINK_LIBRARIES CxxUtils IRegionSelector + LINK_LIBRARIES AthenaBaseComps DecisionHandlingLib TrigCompositeUtilsLib TrigSteeringEvent ) atlas_add_component( TrigPartialEventBuilding src/components/*.cxx LINK_LIBRARIES TrigPartialEventBuildingLib ) # Install files from the package: -atlas_install_python_modules( python/*.py ) - -# Tests -#atlas_add_test( ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) diff --git a/Trigger/TrigAlgorithms/TrigT2BeamSpot/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigT2BeamSpot/CMakeLists.txt index 4fd6a08a0b935019ba5d4040b03ca63f6b702bb7..082eba673cd8c903f0c65156caa7c149899acdf1 100644 --- a/Trigger/TrigAlgorithms/TrigT2BeamSpot/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigT2BeamSpot/CMakeLists.txt @@ -1,40 +1,19 @@ -################################################################################ -# Package: TrigT2BeamSpot -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigT2BeamSpot ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigSteer/TrigInterfaces - PRIVATE - Control/AthContainers - Event/EventInfo - Event/EventPrimitives - GaudiKernel - InnerDetector/InDetConditions/BeamSpotConditionsData - Tracking/TrkEvent/TrkParameters - Tracking/TrkEvent/TrkTrack - Tracking/TrkEvent/TrkTrackSummary - Trigger/TrigEvent/TrigInDetEvent - Trigger/TrigEvent/TrigNavigation - Trigger/TrigTools/TrigInDetToolInterfaces - Trigger/TrigTools/TrigTimeAlgs ) - # External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) +find_package( ROOT COMPONENTS MathCore ) # Component(s) in the package: atlas_add_component( TrigT2BeamSpot src/*.cxx src/components/TrigT2*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaMonitoringKernelLib TrigSteeringEvent TrigInterfacesLib AthContainers EventInfo EventPrimitives GaudiKernel TrkParameters TrkTrack TrkTrackSummary TrigInDetEvent TrigNavigationLib TrigTimeAlgsLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AthenaBaseComps AthenaMonitoringKernelLib BeamSpotConditionsData EventPrimitives GaudiKernel StoreGateLib TrigInDetEvent TrigInDetToolInterfacesLib TrigInterfacesLib TrigNavigationLib TrigSteeringEvent TrigTimeAlgsLib TrkParameters TrkTrack TrkTrackSummary xAODEventInfo ) # Install files from the package: -atlas_install_headers( TrigT2BeamSpot ) -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_joboptions( share/*.py ) diff --git a/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/CMakeLists.txt index 32953b122f62115b9b3c6e025465a63df182c6f1..2d367bdae7cb11af81403295c58a9ee8ce91dffc 100644 --- a/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/CMakeLists.txt @@ -1,38 +1,17 @@ -################################################################################ -# Package: TrigT2HistoPrmVtx -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigT2HistoPrmVtx ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Event/xAOD/xAODTracking - Trigger/TrigSteer/TrigInterfaces - PRIVATE - Event/EventInfo - Event/EventPrimitives - Event/xAOD/xAODBase - GaudiKernel - InnerDetector/InDetConditions/BeamSpotConditionsData - Reconstruction/Particle - Trigger/TrigEvent/TrigInDetEvent - Trigger/TrigEvent/TrigNavigation - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigTools/TrigTimeAlgs ) - # External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) +find_package( ROOT COMPONENTS MathCore ) # Component(s) in the package: atlas_add_component( TrigT2HistoPrmVtx src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} xAODTracking TrigInterfacesLib EventInfo EventPrimitives xAODBase GaudiKernel Particle TrigInDetEvent TrigNavigationLib TrigSteeringEvent TrigTimeAlgsLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps BeamSpotConditionsData CxxUtils EventInfo EventPrimitives GaudiKernel Particle StoreGateLib TrigInDetEvent TrigInterfacesLib TrigNavigationLib TrigSteeringEvent TrigTimeAlgsLib xAODBase xAODTracking ) # Install files from the package: -atlas_install_headers( TrigT2HistoPrmVtx ) -atlas_install_python_modules( python/*.py ) -atlas_install_joboptions( share/*.py ) - +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) diff --git a/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/python/TrigT2HistoPrmVtxComboConfig.py b/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/python/TrigT2HistoPrmVtxComboConfig.py index 9619ac1698fd9ca339a24d60e9502f07c4c29192..3b7c71dddb7bfbc0c84f83ca8f53693f762e0ce3 100755 --- a/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/python/TrigT2HistoPrmVtxComboConfig.py +++ b/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/python/TrigT2HistoPrmVtxComboConfig.py @@ -1,11 +1,7 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from TrigT2HistoPrmVtx.TrigT2HistoPrmVtxConf import TrigT2HistoPrmVtxCombo - -from AthenaCommon.SystemOfUnits import mm, GeV - - class TrigT2HistoPrmVtxComboBase (TrigT2HistoPrmVtxCombo): __slots__ = [] def __init__(self, name): diff --git a/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/share/TriggerConfig_TrigT2HistoPrmVtx.py b/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/share/TriggerConfig_TrigT2HistoPrmVtx.py deleted file mode 100755 index 2c306d45f5d289775d75a3d2967971d76086d3bc..0000000000000000000000000000000000000000 --- a/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/share/TriggerConfig_TrigT2HistoPrmVtx.py +++ /dev/null @@ -1,35 +0,0 @@ -include.block("TrigT2HistoPrmVtx/TriggerConfig_TrigT2HistoPrmVtx.py") -# -# Configure a suitable TrigT2HistoPrmVtx Algorithm instance -# -# Constructor arguments: -# level, type, threshold, isIsolated -# -# e.g. level=L2, type=muon, threshold=30, isIsolated=None -# level=EF, type=egamma, threshold=20, isIsolated=isolated -# -# Methods: -# instanceName() : returns name of algorithm instance -# classAndInstanceName() : returns a list of strings to be entered in the sequence file. This string -# defines the class and instance name -# - -class TriggerConfig_TrigT2HistoPrmVtx: - def __init__(self, level, type = None, threshold = None, isIsolated = None): - - if type == "jet": - self.__instname__ = "TrigT2HistoPrmVtx_jet_" - self.__sequence__ = "TrigT2HistoPrmVtx/TrigT2HistoPrmVtx/jet" - - self.__instname__ += level - - - def instanceName(self): - return self.__instname__ - - def classAndInstanceName(self): - return [ self.__sequence__ ] - -include( "TrigT2HistoPrmVtx/jobOfragment_TrigT2HistoPrmVtx.py") -include.block( "TrigT2HistoPrmVtx/jobOfragment_TrigT2HistoPrmVtx.py") - diff --git a/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/share/jobOfragment_TrigT2HistoPrmVtx.py b/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/share/jobOfragment_TrigT2HistoPrmVtx.py deleted file mode 100755 index c19cf8a5af4b632adadc9978291bdba781c3f988..0000000000000000000000000000000000000000 --- a/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/share/jobOfragment_TrigT2HistoPrmVtx.py +++ /dev/null @@ -1,30 +0,0 @@ -#============================================================= -# -# TrigT2HistoPrmVtx job options -# -#============================================================== - - -#-------------------------------------------------- -# TrigT2HistoPrmVtx algorithm -#-------------------------------------------------- -theApp.Dlls += [ "TrigT2HistoPrmVtx" ] -TrigT2HistoPrmVtx_jet_L2 = Algorithm( "TrigT2HistoPrmVtx_jet_L2" ) - - -#-------------------------------------------------------------- -# Algorithm Private Options -#-------------------------------------------------------------- - - -# SET GENERAL PROPERTIES -# track reconstruction algorithm: SiTrack(1) IdScan(2) -TrigT2HistoPrmVtx_jet_L2.AlgoId = 1 - - -#============================================================== -# -# end of file -# -#============================================================== - diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigT2MinBias/CMakeLists.txt index 340bff10e200dacc29858731146b31815d75bf74..b5617482676d9e88c8b89ba4d8f878505e73575e 100644 --- a/Trigger/TrigAlgorithms/TrigT2MinBias/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigT2MinBias/CMakeLists.txt @@ -1,38 +1,8 @@ -################################################################################ -# Package: TrigT2MinBias -############################################################################### +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigT2MinBias ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PRIVATE - Event/xAOD/xAODTrigMinBias - ForwardDetectors/ZDC/ZdcEvent - GaudiKernel - TileCalorimeter/TileEvent - Trigger/TrigAlgorithms/TrigT2CaloCommon - Trigger/TrigEvent/TrigCaloEvent - Trigger/TrigEvent/TrigInDetEvent - Trigger/TrigSteer/DecisionHandling - Trigger/TrigSteer/TrigCompositeUtils - Trigger/TrigSteer/TrigInterfaces - Trigger/TrigTools/TrigInDetToolInterfaces - DetectorDescription/IRegionSelector - Event/xAOD/xAODEventInfo - ForwardDetectors/ZDC/ZdcConditions - ForwardDetectors/ZDC/ZdcIdentifier - InnerDetector/InDetDetDescr/InDetIdentifier - InnerDetector/InDetRawEvent/InDetRawData - InnerDetector/InDetRecEvent/InDetPrepRawData - TileCalorimeter/TileIdentifier - Tracking/TrkEvent/TrkSpacePoint - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigTools/TrigTimeAlgs - Event/xAOD/xAODTrigger - Control/AthenaMonitoringKernel - Control/AthViews ) - # External dependencies: find_package( tdaq-common ) @@ -40,9 +10,7 @@ find_package( tdaq-common ) atlas_add_component( TrigT2MinBias src/*.cxx src/components/*.cxx INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} - - LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} DecisionHandlingLib xAODTrigger xAODTrigMinBias ZdcEvent GaudiKernel TileEvent TrigT2CaloCommonLib TrigCaloEvent TrigInDetEvent TrigInterfacesLib IRegionSelector xAODEventInfo ZdcConditions ZdcIdentifier InDetIdentifier InDetRawData InDetPrepRawData TileIdentifier TrkSpacePoint TrigSteeringEvent TrigTimeAlgsLib AthViews TrigCompositeUtilsLib) - + LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthViews AthenaBaseComps AthenaMonitoringKernelLib CaloEvent CaloIdentifier DecisionHandlingLib GaudiKernel IRegionSelector InDetIdentifier InDetPrepRawData InDetRawData StoreGateLib TileByteStreamLib TileConditionsLib TileEvent TileIdentifier TrigCaloEvent TrigCompositeUtilsLib TrigInDetEvent TrigInDetToolInterfacesLib TrigInterfacesLib TrigSteeringEvent TrigT2CaloCommonLib TrigTimeAlgsLib TrkSpacePoint ZdcConditions ZdcEvent ZdcIdentifier xAODEventInfo xAODTrigMinBias xAODTrigger ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/python/MbtsConfig.py b/Trigger/TrigAlgorithms/TrigT2MinBias/python/MbtsConfig.py index a6c2270a7c486b4979344f027c4013af23be24d4..efd8baa3af5ed6ce80c0e5590dab1757b4d170cb 100644 --- a/Trigger/TrigAlgorithms/TrigT2MinBias/python/MbtsConfig.py +++ b/Trigger/TrigAlgorithms/TrigT2MinBias/python/MbtsConfig.py @@ -1,3 +1,4 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from TrigT2MinBias.TrigT2MinBiasConf import MbtsFexMT from TrigT2MinBias.TrigT2MinBiasMonitoringMT import MbtsFexMTMonitoring diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/python/TrigT2MinBiasConfig.py b/Trigger/TrigAlgorithms/TrigT2MinBias/python/TrigT2MinBiasConfig.py index 922b5d7cae532351f3323d8b8ac1adec280e5b4f..f72969c45a86fb1bd02add9fa56b466876be15a0 100644 --- a/Trigger/TrigAlgorithms/TrigT2MinBias/python/TrigT2MinBiasConfig.py +++ b/Trigger/TrigAlgorithms/TrigT2MinBias/python/TrigT2MinBiasConfig.py @@ -1,10 +1,9 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # -*- coding: utf-8 -*- from TrigT2MinBias.TrigT2MinBiasConf import T2ZdcFex, T2ZdcHypo from TrigT2MinBias.TrigT2MinBiasConf import T2MbtsFex, T2MbtsHypo from TrigT2MinBias.TrigT2MinBiasConf import TrigCountSpacePoints, TrigCountSpacePointsHypo -from TrigT2MinBias.TrigT2MinBiasConf import TrigCountTrtHits, TrigCountTrtHitsHypo # Monitoring from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig @@ -13,10 +12,6 @@ from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig # Properties for histogram dimensions from TrigT2MinBias.TrigT2MinBiasProperties import trigT2MinBiasProperties -from AthenaCommon.AppMgr import ToolSvc - -#ToolSvc += ospTool - fexes = {} hypos = {} @@ -1318,82 +1313,82 @@ fexes["L2MbZdcFex_LG"] = L2MbZdcFex_LG class ZdcHypoMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="ZdcHypoMonitoring"): - super(ZdcHypoMonitoring, self).__init__(name) - self.defineTarget( ["Online", "Validation", "Cosmic"]) - - - self.Histograms += [ defineHistogram('MultiplicityZDC_A', - type = 'TH1I', - title = "Num ZDC Modules Side A", - xbins = 5, xmin=-0.5, xmax=5.5)] - - self.Histograms += [ defineHistogram('MultiplicityZDC_C', - type = 'TH1I', - title = "Num ZDC Modules Side C", - xbins = 5, xmin=-0.5, xmax=5.5)] - - self.Histograms += [ defineHistogram('TimeZDC_A', - type = 'TH1F', - title = "ZDC Mean Time Side A", - xbins = 100, xmin=-10, xmax=10)] - - self.Histograms += [ defineHistogram('TimeZDC_C', - type = 'TH1F', - title = "ZDC Mean Time Side C", - xbins = 100, xmin=-10, xmax=10)] - - self.Histograms += [ defineHistogram('SumEnergyZDC_A', - type = 'TH1F', - title = "ZDC Sum Energy Side A", - xbins = 500, xmin=0, xmax=5000)] - - self.Histograms += [ defineHistogram('SumEnergyZDC_C', - type = 'TH1F', - title = "ZDC Sum Energy Side C", - xbins = 500, xmin=0, xmax=5000)] - - self.Histograms += [ defineHistogram('TimeDiff_A_C', - type = 'TH1F', - title = "ZDC Time Diff (A-C)", - xbins = 100, xmin=-10, xmax=10)] + def __init__ (self, name="ZdcHypoMonitoring"): + super(ZdcHypoMonitoring, self).__init__(name) + self.defineTarget( ["Online", "Validation", "Cosmic"]) + + + self.Histograms += [ defineHistogram('MultiplicityZDC_A', + type = 'TH1I', + title = "Num ZDC Modules Side A", + xbins = 5, xmin=-0.5, xmax=5.5)] + + self.Histograms += [ defineHistogram('MultiplicityZDC_C', + type = 'TH1I', + title = "Num ZDC Modules Side C", + xbins = 5, xmin=-0.5, xmax=5.5)] + + self.Histograms += [ defineHistogram('TimeZDC_A', + type = 'TH1F', + title = "ZDC Mean Time Side A", + xbins = 100, xmin=-10, xmax=10)] + + self.Histograms += [ defineHistogram('TimeZDC_C', + type = 'TH1F', + title = "ZDC Mean Time Side C", + xbins = 100, xmin=-10, xmax=10)] + + self.Histograms += [ defineHistogram('SumEnergyZDC_A', + type = 'TH1F', + title = "ZDC Sum Energy Side A", + xbins = 500, xmin=0, xmax=5000)] + + self.Histograms += [ defineHistogram('SumEnergyZDC_C', + type = 'TH1F', + title = "ZDC Sum Energy Side C", + xbins = 500, xmin=0, xmax=5000)] + + self.Histograms += [ defineHistogram('TimeDiff_A_C', + type = 'TH1F', + title = "ZDC Time Diff (A-C)", + xbins = 100, xmin=-10, xmax=10)] # after selection - self.Histograms += [ defineHistogram('SelMultiplicityZDC_A', - type = 'TH1I', - title = "Num ZDC Modules Side A (After)", - xbins = 5, xmin=-0.5, xmax=5.5)] + self.Histograms += [ defineHistogram('SelMultiplicityZDC_A', + type = 'TH1I', + title = "Num ZDC Modules Side A (After)", + xbins = 5, xmin=-0.5, xmax=5.5)] - self.Histograms += [ defineHistogram('SelMultiplicityZDC_C', - type = 'TH1I', - title = "Num ZDC Modules Side C (After)", - xbins = 5, xmin=-0.5, xmax=5.5)] + self.Histograms += [ defineHistogram('SelMultiplicityZDC_C', + type = 'TH1I', + title = "Num ZDC Modules Side C (After)", + xbins = 5, xmin=-0.5, xmax=5.5)] - self.Histograms += [ defineHistogram('SelTimeZDC_A', - type = 'TH1F', - title = "ZDC Mean Time Side A (After)", - xbins = 100, xmin=-10, xmax=10)] + self.Histograms += [ defineHistogram('SelTimeZDC_A', + type = 'TH1F', + title = "ZDC Mean Time Side A (After)", + xbins = 100, xmin=-10, xmax=10)] - self.Histograms += [ defineHistogram('SelTimeZDC_C', - type = 'TH1F', - title = "ZDC Mean Time Side C (After)", - xbins = 100, xmin=-10, xmax=10)] + self.Histograms += [ defineHistogram('SelTimeZDC_C', + type = 'TH1F', + title = "ZDC Mean Time Side C (After)", + xbins = 100, xmin=-10, xmax=10)] - self.Histograms += [ defineHistogram('SelSumEnergyZDC_A', - type = 'TH1F', - title = "ZDC Sum Energy Side A (After)", - xbins = 500, xmin=0, xmax=5000)] + self.Histograms += [ defineHistogram('SelSumEnergyZDC_A', + type = 'TH1F', + title = "ZDC Sum Energy Side A (After)", + xbins = 500, xmin=0, xmax=5000)] - self.Histograms += [ defineHistogram('SelSumEnergyZDC_C', - type = 'TH1F', - title = "ZDC Sum Energy Side C (After)", - xbins = 500, xmin=0, xmax=5000)] + self.Histograms += [ defineHistogram('SelSumEnergyZDC_C', + type = 'TH1F', + title = "ZDC Sum Energy Side C (After)", + xbins = 500, xmin=0, xmax=5000)] - self.Histograms += [ defineHistogram('SelTimeDiff_A_C', - type = 'TH1F', - title = "ZDC Time Diff (A-C) (After)", - xbins = 100, xmin=-10, xmax=10)] + self.Histograms += [ defineHistogram('SelTimeDiff_A_C', + type = 'TH1F', + title = "ZDC Time Diff (A-C) (After)", + xbins = 100, xmin=-10, xmax=10)] @@ -1413,11 +1408,11 @@ L2MbZdcHypo_PT.TimeLogic = 0 L2MbZdcHypo_PT.EnergyLogic = 1 L2MbZdcHypo_PT.MultiplicityLogic = 0 L2MbZdcHypo_PT.TimeOffset = [0., 0., 0., 0., - 0., 0., 0., 0.] + 0., 0., 0., 0.] L2MbZdcHypo_PT.Pedestal = [0., 0., 0., 0., - 0., 0., 0., 0.] + 0., 0., 0., 0.] L2MbZdcHypo_PT.EnergyCalibration = [1., 1., 1., 1., - 1., 1., 1., 1.] + 1., 1., 1., 1.] L2MbZdcHypo_PT.TimeModuleCut = 99999. L2MbZdcHypo_PT.SumEnergyCut = [-1., 99999., -1., 99999.] L2MbZdcHypo_PT.MultCut = [ -1 , -1 ] @@ -1431,11 +1426,11 @@ L2MbZdcHypo_hip_low_sideA.TimeLogic = 0 L2MbZdcHypo_hip_low_sideA.EnergyLogic = 2 ## OR L2MbZdcHypo_hip_low_sideA.MultiplicityLogic = 0 L2MbZdcHypo_hip_low_sideA.TimeOffset = [0., 0., 0., 0., - 0., 0., 0., 0.] + 0., 0., 0., 0.] L2MbZdcHypo_hip_low_sideA.Pedestal = [0., 0., 0., 0., - 0., 0., 0., 0.] + 0., 0., 0., 0.] L2MbZdcHypo_hip_low_sideA.EnergyCalibration = [1., 1., 1., 1., - 1., 1., 1., 1.] + 1., 1., 1., 1.] L2MbZdcHypo_hip_low_sideA.TimeModuleCut = 99999. L2MbZdcHypo_hip_low_sideA.SumEnergyCut = [180., 99999., 99999., -1] # 1<A<2 || 3<C<4 L2MbZdcHypo_hip_low_sideA.MultCut = [ -1 , -1 ] @@ -1450,11 +1445,11 @@ L2MbZdcHypo_hip_low_sideC.TimeLogic = 0 L2MbZdcHypo_hip_low_sideC.EnergyLogic = 2 ## OR L2MbZdcHypo_hip_low_sideC.MultiplicityLogic = 0 L2MbZdcHypo_hip_low_sideC.TimeOffset = [0., 0., 0., 0., - 0., 0., 0., 0.] + 0., 0., 0., 0.] L2MbZdcHypo_hip_low_sideC.Pedestal = [0., 0., 0., 0., - 0., 0., 0., 0.] + 0., 0., 0., 0.] L2MbZdcHypo_hip_low_sideC.EnergyCalibration = [1., 1., 1., 1., - 1., 1., 1., 1.] + 1., 1., 1., 1.] L2MbZdcHypo_hip_low_sideC.TimeModuleCut = 99999. L2MbZdcHypo_hip_low_sideC.SumEnergyCut = [99999.,-1., 180., 99999.] # 1<A<2 || 3<C<4 L2MbZdcHypo_hip_low_sideC.MultCut = [ -1 , -1 ] @@ -1469,11 +1464,11 @@ L2MbZdcHypo_hip_hi_sideA.TimeLogic = 0 L2MbZdcHypo_hip_hi_sideA.EnergyLogic = 2 ## OR L2MbZdcHypo_hip_hi_sideA.MultiplicityLogic = 0 L2MbZdcHypo_hip_hi_sideA.TimeOffset = [0., 0., 0., 0., - 0., 0., 0., 0.] + 0., 0., 0., 0.] L2MbZdcHypo_hip_hi_sideA.Pedestal = [0., 0., 0., 0., - 0., 0., 0., 0.] + 0., 0., 0., 0.] L2MbZdcHypo_hip_hi_sideA.EnergyCalibration = [1., 1., 1., 1., - 1., 1., 1., 1.] + 1., 1., 1., 1.] L2MbZdcHypo_hip_hi_sideA.TimeModuleCut = 99999. L2MbZdcHypo_hip_hi_sideA.SumEnergyCut = [300., 99999., 99999., -1.] # 1<A<2 || 3<C<4 L2MbZdcHypo_hip_hi_sideA.MultCut = [ -1 , -1 ] @@ -1488,11 +1483,11 @@ L2MbZdcHypo_hip_hi_sideC.TimeLogic = 0 L2MbZdcHypo_hip_hi_sideC.EnergyLogic = 2 ## OR L2MbZdcHypo_hip_hi_sideC.MultiplicityLogic = 0 L2MbZdcHypo_hip_hi_sideC.TimeOffset = [0., 0., 0., 0., - 0., 0., 0., 0.] + 0., 0., 0., 0.] L2MbZdcHypo_hip_hi_sideC.Pedestal = [0., 0., 0., 0., - 0., 0., 0., 0.] + 0., 0., 0., 0.] L2MbZdcHypo_hip_hi_sideC.EnergyCalibration = [1., 1., 1., 1., - 1., 1., 1., 1.] + 1., 1., 1., 1.] L2MbZdcHypo_hip_hi_sideC.TimeModuleCut = 99999. L2MbZdcHypo_hip_hi_sideC.SumEnergyCut = [99999.,-1., 300., 99999.] # 1<A<2 || 3<C<4 L2MbZdcHypo_hip_hi_sideC.MultCut = [ -1 , -1 ] diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/python/TrigT2MinBiasMonitoringMT.py b/Trigger/TrigAlgorithms/TrigT2MinBias/python/TrigT2MinBiasMonitoringMT.py index 3da6332aeadad56300da18f9aa33f9f78803e344..e91b8a45cf1025789b76a4e4cd7e791e5d56da84 100644 --- a/Trigger/TrigAlgorithms/TrigT2MinBias/python/TrigT2MinBiasMonitoringMT.py +++ b/Trigger/TrigAlgorithms/TrigT2MinBias/python/TrigT2MinBiasMonitoringMT.py @@ -1,3 +1,4 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration def SpCountMonitoring(): diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/python/TrigT2MinBiasProperties.py b/Trigger/TrigAlgorithms/TrigT2MinBias/python/TrigT2MinBiasProperties.py index 706bb1496181b278ff04233ea9fc3ef659cdd6c9..35d055629aa7786b4af1fcfd5a2ef4ba95e51a5e 100644 --- a/Trigger/TrigAlgorithms/TrigT2MinBias/python/TrigT2MinBiasProperties.py +++ b/Trigger/TrigAlgorithms/TrigT2MinBias/python/TrigT2MinBiasProperties.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration ## ## @file Trigger/TrigAlgorithms/TrigT2MinBias/python/TrigT2MinBiasProperties.py @@ -19,7 +19,6 @@ __all__ = [ "trigT2MinBiasProperties" ] ## Import from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer -from AthenaCommon.JobProperties import jobproperties ##----------------------------------------------------------------------------- ## 1st step: define JobProperty classes @@ -114,8 +113,8 @@ log = logging.getLogger( 'TrigT2MinBiasProperties.py' ) try: from TriggerMenu import useNewTriggerMenu useNewTM = useNewTriggerMenu() - log.info("Using new TriggerMenu: %r" % useNewTM) -except: + log.info("Using new TriggerMenu: %r", useNewTM) +except Exception: useNewTM = False log.info("Using old TriggerMenuPython since TriggerMenu.useNewTriggerMenu can't be imported") diff --git a/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/CMakeLists.txt index 9866464579148544440d293bde2d2f95d5795c7a..d6d65c95ff1c8f547b38ff2eaea31d05031354ac 100644 --- a/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/CMakeLists.txt @@ -1,34 +1,10 @@ -################################################################################ -# Package: TrigTRTHighTHitCounter -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigTRTHighTHitCounter ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - GaudiKernel - PRIVATE - DetectorDescription/GeoPrimitives - DetectorDescription/Identifier - Event/xAOD/xAODTrigRinger - InnerDetector/InDetDetDescr/InDetIdentifier - InnerDetector/InDetRecEvent/InDetPrepRawData - Trigger/TrigEvent/TrigCaloEvent - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigSteer/TrigInterfaces - Trigger/TrigTools/TrigInDetToolInterfaces ) - -# External dependencies: -find_package( Eigen ) -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) - -include_directories(src) - # Component(s) in the package: atlas_add_component( TrigTRTHighTHitCounter src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} GaudiKernel GeoPrimitives Identifier xAODTrigRinger InDetIdentifier InDetPrepRawData TrigCaloEvent TrigSteeringEvent TrigInterfacesLib EventContainers) - + LINK_LIBRARIES CxxUtils GaudiKernel GeoPrimitives Identifier InDetIdentifier InDetPrepRawData TrigCaloEvent TrigInterfacesLib TrigSteeringEvent xAODTrigRinger ) diff --git a/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/src/TrigTRTHTHCounter.cxx b/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/src/TrigTRTHTHCounter.cxx index 319e4a8aebd5201e525d8763301479ce5113b24b..59ab633ca4264d72ae4f9a4d170345f61c45104e 100644 --- a/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/src/TrigTRTHTHCounter.cxx +++ b/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/src/TrigTRTHTHCounter.cxx @@ -1,31 +1,22 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "TrigTRTHTHCounter.h" #include "TrigSteeringEvent/TrigRoiDescriptor.h" +#include "CxxUtils/phihelper.h" #include "InDetIdentifier/TRT_ID.h" #include "Identifier/IdentifierHash.h" #include "InDetPrepRawData/TRT_DriftCircleContainer.h" #include "TrigCaloEvent/TrigEMCluster.h" #include "xAODTrigRinger/TrigRNNOutput.h" -#include "TMath.h" #include "GeoPrimitives/GeoPrimitives.h" #include<cmath> #include<fstream> -const double PI = TMath::Pi(); -const double TWOPI = 2.0*PI; - -//Function to return deltaPhi between -PI and PI -double hth_delta_phi(const float& phi1, const float& phi2){ - float PHI=fabs(phi1-phi2); - return (PHI<=PI)? PHI : TWOPI-PHI; -} - //Function to calculate distance for road algorithm float dist2COR(float R, float phi1, float phi2){ float PHI=fabs(phi1-phi2); @@ -138,7 +129,7 @@ HLT::ErrorCode TrigTRTHTHCounter::hltExecute(const HLT::TriggerElement* inputTE, //Sanity check of the ROI size double deltaEta=fabs(roi->etaPlus()-roi->etaMinus()); - double deltaPhi=hth_delta_phi(roi->phiPlus(),roi->phiMinus()); + double deltaPhi=CxxUtils::deltaPhi(roi->phiPlus(),roi->phiMinus()); float phiTolerance = 0.001; float etaTolerance = 0.001; @@ -200,12 +191,12 @@ HLT::ErrorCode TrigTRTHTHCounter::hltExecute(const HLT::TriggerElement* inputTE, //First, define coarse wedges in phi, and count the TRT hits in these wedges int countbin=0; - if(hth_delta_phi(hphi, roi->phi()) < 0.1){ + if(CxxUtils::deltaPhi(hphi, static_cast<float>(roi->phi())) < 0.1){ float startValue = roi->phi() - m_phiHalfWidth + coarseWedgeHalfWidth; float endValue = roi->phi() + m_phiHalfWidth; float increment = 2*coarseWedgeHalfWidth; for(float roibincenter = startValue; roibincenter < endValue; roibincenter += increment){ - if (hth_delta_phi(hphi,roibincenter)<=coarseWedgeHalfWidth) { + if (CxxUtils::deltaPhi(hphi,roibincenter)<=coarseWedgeHalfWidth) { if(hth) count_httrt_c.at(countbin) += 1.; count_tottrt_c.at(countbin) += 1.; break; //the hit has been assigned to one of the coarse wedges, so no need to continue the for loop @@ -245,12 +236,12 @@ HLT::ErrorCode TrigTRTHTHCounter::hltExecute(const HLT::TriggerElement* inputTE, //Now, define fine wedges in phi, centered around the best coarse wedge, and count the TRT hits in these fine wedges for(size_t v=0;v<hit.size();v++){ int countbin=0; - if(hth_delta_phi(hit[v].phi, center_pos_phi) < 0.01){ + if(CxxUtils::deltaPhi(hit[v].phi, center_pos_phi) < 0.01){ float startValue = center_pos_phi - 3*coarseWedgeHalfWidth + fineWedgeHalfWidth; float endValue = center_pos_phi + 3*coarseWedgeHalfWidth; float increment = 2*fineWedgeHalfWidth; for(float roibincenter = startValue; roibincenter < endValue; roibincenter += increment){ - if (hth_delta_phi(hit[v].phi,roibincenter)<=fineWedgeHalfWidth) { + if (CxxUtils::deltaPhi(hit[v].phi,roibincenter)<=fineWedgeHalfWidth) { if(hit[v].isHT) count_httrt.at(countbin) += 1.; count_tottrt.at(countbin) += 1.; break; //the hit has been assigned to one of the fine wedges, so no need to continue the for loop diff --git a/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/src/components/TrigTRTHighTHitCounter_entries.cxx b/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/src/components/TrigTRTHighTHitCounter_entries.cxx index 78295f132f6baadb1f2a4d22709dbe7080179898..4a169e81de3718ce9c08ff61a00edc96af88478d 100644 --- a/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/src/components/TrigTRTHighTHitCounter_entries.cxx +++ b/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/src/components/TrigTRTHighTHitCounter_entries.cxx @@ -1,6 +1,5 @@ -#include "TrigTRTHTHCounter.h" -#include "TrigTRTHTHhypo.h" - +#include "../TrigTRTHTHCounter.h" +#include "../TrigTRTHTHhypo.h" DECLARE_COMPONENT( TrigTRTHTHCounter ) DECLARE_COMPONENT( TrigTRTHTHhypo ) diff --git a/Trigger/TrigAlgorithms/TrigTauRec/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigTauRec/CMakeLists.txt index 342c04c011f9bf0692791b6afddb255fab677791..7e7c4c1cf1457ac5c207265681bd54ec317a424a 100644 --- a/Trigger/TrigAlgorithms/TrigTauRec/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigTauRec/CMakeLists.txt @@ -1,41 +1,12 @@ -################################################################################ -# Package: TrigTauRec -################################################################################ +#Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigTauRec ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PRIVATE - GaudiKernel - InnerDetector/InDetConditions/BeamSpotConditionsData - LumiBlock/LumiBlockComps - Reconstruction/tauRecTools - Trigger/TrigEvent/TrigParticle - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigSteer/TrigInterfaces - Trigger/TrigTools/TrigTimeAlgs - Calorimeter/CaloEvent - Event/EventKernel - Event/NavFourMom - Event/xAOD/xAODJet - Event/xAOD/xAODTau - Event/xAOD/xAODTracking - Reconstruction/Particle - Tracking/TrkEvent/VxVertex - Trigger/TrigT1/TrigT1Interfaces - Control/AthAnalysisBaseComps) - # Component(s) in the package: atlas_add_component( TrigTauRec src/*.cxx src/components/*.cxx - LINK_LIBRARIES GaudiKernel LumiBlockCompsLib tauRecToolsLib TrigParticle TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib CaloEvent EventKernel NavFourMom xAODJet xAODTau xAODTracking Particle VxVertex TrigT1Interfaces AthAnalysisBaseCompsLib) + LINK_LIBRARIES AthAnalysisBaseCompsLib AthenaBaseComps AthenaMonitoringKernelLib BeamSpotConditionsData CaloEvent EventKernel GaudiKernel LumiBlockCompsLib NavFourMom Particle StoreGateLib TrigInterfacesLib TrigParticle TrigSteeringEvent TrigT1Interfaces TrigTimeAlgsLib VxVertex tauRecToolsLib xAODJet xAODTau xAODTracking ) # Install files from the package: -atlas_install_python_modules( python/*.py ) -atlas_install_joboptions( share/*.py ) - -# Check python syntax: -atlas_add_test( flake8 - SCRIPT flake8 --select=ATL,F,E7,E9,W6 --enable-extension=ATL900,ATL901 ${CMAKE_CURRENT_SOURCE_DIR}/python - POST_EXEC_SCRIPT nopost.sh ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) diff --git a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfig.py b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfig.py index 5e167771c31cfa0c676fb6adb67e5a0eb9fc6143..8585bf1ba90a0f8c786acf15594fd8e0b25103f3 100644 --- a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfig.py +++ b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration """ TrigTauRec """ @@ -47,17 +47,16 @@ class TrigTauRecMerged_Tau (TrigTauRecMerged) : tools.append(taualgs.getTauCommonCalcVars()) tools.append(taualgs.getTauSubstructure()) #tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=False, correctAxis=True, postfix='_onlyAxis')) - for tool in tools: tool.inTrigger = True tool.calibFolder = 'TrigTauRec/00-11-02/' - + self.Tools = tools ## add beam type flag from AthenaCommon.BeamFlags import jobproperties self.BeamType = jobproperties.Beam.beamType() - + class TrigTauRecMerged_Tau2012 (TrigTauRecMerged) : __slots__ = [ '_mytools'] diff --git a/Trigger/TrigAlgorithms/TrigTauRec/share/TriggerConfig_TrigTauRec.py b/Trigger/TrigAlgorithms/TrigTauRec/share/TriggerConfig_TrigTauRec.py deleted file mode 100755 index 07f42c1b38a1aceebff0949f8bf1e9955cea33b5..0000000000000000000000000000000000000000 --- a/Trigger/TrigAlgorithms/TrigTauRec/share/TriggerConfig_TrigTauRec.py +++ /dev/null @@ -1,35 +0,0 @@ -include.block("TrigTauRec/TriggerConfig_TrigTauRec.py") -# -# Configure a suitable TrigTauRec Algorithm instance -# -# Constructor arguments: -# level, type, threshold, isIsolated -# -# e.g. level=L2, type=muon, threshold=30, isIsolated=None -# level=EF, type=egamma, threshold=20, isIsolated=isolated -# -# Methods: -# instanceName() : returns name of algorithm instance -# classAndInstanceName() : returns a string to be entered in the sequence file. This string -# defines the class and instance name -# - - -class TriggerConfig_TrigTauRec: - def __init__(self, type = None, threshold = None, isIsolated = None): - - # currently only one option defined - - self.__instname__ = "TrigTauRec_h5_EF" - self.__sequence__ = "TrigTauRec/TrigTauRec/h5" - - def instanceName(self): - return self.__instname__ - - def classAndInstanceName(self): - return [ self.__sequence__ ] - -if TriggerFlags.TauSlice.doEFID() and TriggerFlags.TauSlice.doEFCalo(): - include("TrigTauRec/jobOfragment_TrigTauRec.py") -elif TriggerFlags.TauSlice.doEFCalo(): - include("TrigTauRec/jobOfragment_TrigTauRec_noID.py") diff --git a/Trigger/TrigAlgorithms/TrigTauRec/share/jobOfragment_TrigTauRec.py b/Trigger/TrigAlgorithms/TrigTauRec/share/jobOfragment_TrigTauRec.py deleted file mode 100755 index c07fadcd88b5c600fbaba205da00936f5c8b4d83..0000000000000000000000000000000000000000 --- a/Trigger/TrigAlgorithms/TrigTauRec/share/jobOfragment_TrigTauRec.py +++ /dev/null @@ -1,85 +0,0 @@ -# jobOptions file for tau Reconstruction - -theApp.Dlls += [ "tauRec", "TrigTauRec" ] -theApp.Dlls += [ "CaloUtils"] - - -#-------------------------------------------------------------- -# Algorithms Private Options -#-------------------------------------------------------------- -#tower Maker sub-algorithms: -TrigTauRec_h5_EF = Algorithm( "TrigTauRec_h5_EF" ) - -TrigTauRec_h5_EF.toolNames = [ - "tauSeedBuilder/TrigTauSeeds", - "tauTrack/TrigTauTracks", - "tauCellBuilder/TrigTauCells", - "tauCalibrateWeightTool/TrigTauCalibrate", - ] - - - -# For data with noise, threshold on cells -TrigTauRec_h5_EF.TrigTauSeeds.seedContainerName = "RoIEMCalo" -TrigTauRec_h5_EF.TrigTauSeeds.UseCaloNoiseTool = FALSE -TrigTauRec_h5_EF.TrigTauSeeds.UsePileUpNoise = FALSE -TrigTauRec_h5_EF.TrigTauSeeds.useCaloCellList = 1 - -# which tracks to use -TrigTauRec_h5_EF.TrigTauTracks.TrackContainer = "TrigTauTrackCandidate" -TrigTauRec_h5_EF.TrigTauTracks.VxPrimaryCandidate = "TrigTauVtxPrimaryCandidate" -TrigTauRec_h5_EF.TrigTauTracks.TrackPTmin = 2000.0 -TrigTauRec_h5_EF.TrigTauTracks.TrackDist = 0.3 - -# parameters required by tauCellBuilder tool: -TrigTauRec_h5_EF.TrigTauCells.CellEthreshold = 200.0 -TrigTauRec_h5_EF.TrigTauCells.StripEthreshold = 200.0 -TrigTauRec_h5_EF.TrigTauCells.EMSumThreshold = 500.0 -TrigTauRec_h5_EF.TrigTauCells.EMSumRadius = 0.2 - -# -# select G4-jet weights -TrigTauRec_h5_EF.TrigTauCalibrate.CellWeightTool="H1WeightToolCSC12" -TrigTauRec_h5_EF.TrigTauCalibrate.pTNumberOfBins = 3 -TrigTauRec_h5_EF.TrigTauCalibrate.etaNumberOfBins = 3 -TrigTauRec_h5_EF.TrigTauCalibrate.pTPoints = [ 15000, 35000, 150000 ] -TrigTauRec_h5_EF.TrigTauCalibrate.etaPoints = [ 0.25, 1.0, 2.0 ] -TrigTauRec_h5_EF.TrigTauCalibrate.pTetaCorrectionsNtr1= [ - ## made with histo pT(tauMC)/pT(tauRec) vs pT vs eta, llh>2, ntr==1 - ##eta=0.0..0.5 0.5..1.5 1.5..2.5 - 0.8339, 0.8125, 0.8254, ## pt=-5 .. 30 - 0.8747, 0.8583, 0.8594, ## pt=30 .. 40 - 0.9088, 0.9013, 0.8922 ## pt=40 .. 1000 - ] -TrigTauRec_h5_EF.TrigTauCalibrate.pTetaCorrectionsNtr23= [ - ## made with histo pT(tauMC)/pT(tauRec) vs pT vs eta, llh>2, ntr==2||3 - ##eta=0.0..0.5 0.5..1.5 1.5..2.5 - 0.9000, 0.8593, 0.9034, ## pt=-5 .. 30 - 0.9208, 0.8791, 0.9132, ## pt=30 .. 40 - 0.9359, 0.9231, 0.9033 ## pt=40 .. 1000 - ] -TrigTauRec_h5_EF.TrigTauCalibrate.FudgeFactor = 1.011 - -# Cut values in TrigTauCuts to select tau's -#TrigTauRec_h5_EF.TrigTauCuts.NumTrackMin = 1 # Min. number tracks -#TrigTauRec_h5_EF.TrigTauCuts.NumTrackMax = 3 # Max. number tracks -#TrigTauRec_h5_EF.TrigTauCuts.EMRadiusMax = 0.15 # Max. EM radius -#TrigTauRec_h5_EF.TrigTauCuts.IsolationFracMax = 0.3 # Max. isolation fraction -#TrigTauRec_h5_EF.TrigTauCuts.EMFractionMin = 0.6 # Min. fraction of Et in the EM layers -#TrigTauRec_h5_EF.TrigTauCuts.PtMaxTrackMin = 10000.0 # Min. Pt of the hardest track - - -TrigTauRec_h5_EF.TrigTauTracks.tauRecTTCExtrapolator.Extrapolator='Trk::Extrapolator/InDetExtrapolator' -TrigTauRec_h5_EF.TrigTauTracks.tauRecTTCExtrapolator.CaloDepthTool.DepthChoice = "entrance" - -from TrkVertexBilloirTools.TrkVertexBilloirToolsConf import Trk__FastVertexFitter -TauRecFitterTool = Trk__FastVertexFitter( - Extrapolator = "Trk::Extrapolator/InDetExtrapolator" - ) - -ToolSvc += TauRecFitterTool -print TauRecFitterTool - - - - diff --git a/Trigger/TrigAlgorithms/TrigTauRec/share/jobOfragment_TrigTauRec_noID.py b/Trigger/TrigAlgorithms/TrigTauRec/share/jobOfragment_TrigTauRec_noID.py deleted file mode 100755 index 8faa9bf41163acc18b2cd4ebe0e8e7386f453c53..0000000000000000000000000000000000000000 --- a/Trigger/TrigAlgorithms/TrigTauRec/share/jobOfragment_TrigTauRec_noID.py +++ /dev/null @@ -1,60 +0,0 @@ -# jobOptions file for tau Reconstruction - -theApp.Dlls += [ "tauRec", "TrigTauRec" ] -theApp.Dlls += [ "CaloUtils"] - - -#-------------------------------------------------------------- -# Algorithms Private Options -#-------------------------------------------------------------- -#tower Maker sub-algorithms: -TrigTauRec_h5_EF = Algorithm( "TrigTauRec_h5_EF" ) - -TrigTauRec_h5_EF.toolNames = [ - "tauSeedBuilder/TrigTauSeeds", - "tauCellBuilder/TrigTauCells", - "tauCalibrateWeightTool/TrigTauCalibrate", - ] -TrigTauRec_h5_EF.toolContainers = [ - "TrigTauRec_h5_EF.TrigTauSeeds seedContainerName", - ] - - -# For data with noise, threshold on cells -TrigTauRec_h5_EF.TrigTauSeeds.seedContainerName = "RoIEMCalo" -TrigTauRec_h5_EF.TrigTauSeeds.UseCaloNoiseTool = FALSE -TrigTauRec_h5_EF.TrigTauSeeds.UsePileUpNoise = FALSE -TrigTauRec_h5_EF.TrigTauSeeds.useCaloCellList = 1 - -# parameters required by tauCellBuilder tool: -TrigTauRec_h5_EF.TrigTauCells.CellEthreshold = 200.0 -TrigTauRec_h5_EF.TrigTauCells.StripEthreshold = 200.0 -TrigTauRec_h5_EF.TrigTauCells.EMSumThreshold = 500.0 -TrigTauRec_h5_EF.TrigTauCells.EMSumRadius = 0.2 - -# select G4-jet weights -TrigTauRec_h5_EF.TrigTauCalibrate.CellWeightTool="H1WeightToolCSC12" -TrigTauRec_h5_EF.TrigTauCalibrate.pTNumberOfBins = 3 -TrigTauRec_h5_EF.TrigTauCalibrate.etaNumberOfBins = 3 -TrigTauRec_h5_EF.TrigTauCalibrate.pTPoints = [ 15000, 35000, 150000 ] -TrigTauRec_h5_EF.TrigTauCalibrate.etaPoints = [ 0.25, 1.0, 2.0 ] -TrigTauRec_h5_EF.TrigTauCalibrate.pTetaCorrectionsNtr1= [ - ## made with histo pT(tauMC)/pT(tauRec) vs pT vs eta, llh>2, ntr==1 - ##eta=0.0..0.5 0.5..1.5 1.5..2.5 - 0.8339, 0.8125, 0.8254, ## pt=-5 .. 30 - 0.8747, 0.8583, 0.8594, ## pt=30 .. 40 - 0.9088, 0.9013, 0.8922 ## pt=40 .. 1000 - ] -TrigTauRec_h5_EF.TrigTauCalibrate.pTetaCorrectionsNtr23= [ - ## made with histo pT(tauMC)/pT(tauRec) vs pT vs eta, llh>2, ntr==2||3 - ##eta=0.0..0.5 0.5..1.5 1.5..2.5 - 0.9000, 0.8593, 0.9034, ## pt=-5 .. 30 - 0.9208, 0.8791, 0.9132, ## pt=30 .. 40 - 0.9359, 0.9231, 0.9033 ## pt=40 .. 1000 - ] -TrigTauRec_h5_EF.TrigTauCalibrate.FudgeFactor = 1.011 - - - - - diff --git a/Trigger/TrigAlgorithms/TrigTileMuId/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigTileMuId/CMakeLists.txt index 3ee6fd14a239cef488ddd6819926de6443067224..b890b0e4eed24b52805335a305bf558093f4df83 100644 --- a/Trigger/TrigAlgorithms/TrigTileMuId/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigTileMuId/CMakeLists.txt @@ -1,38 +1,12 @@ -################################################################################ -# Package: TrigTileMuId -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigTileMuId ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PRIVATE - Control/AthenaBaseComps - GaudiKernel - MagneticField/MagFieldInterfaces - TileCalorimeter/TileEvent - TileCalorimeter/TileSvc/TileByteStream - Trigger/TrigAlgorithms/TrigT2CaloCommon - Trigger/TrigEvent/TrigInDetEvent - Trigger/TrigEvent/TrigMuonEvent - Trigger/TrigSteer/TrigInterfaces - Trigger/TrigTools/TrigTimeAlgs - Calorimeter/CaloIdentifier - Control/AthenaKernel - Control/AthenaMonitoring - Control/CxxUtils - DetectorDescription/RegionSelector - Event/ByteStreamCnvSvcBase - Event/ByteStreamData - Generators/GeneratorObjects - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigT1/TrigT1Interfaces - Trigger/TrigTools/TrigInDetToolInterfaces ) - # Component(s) in the package: atlas_add_component( TrigTileMuId src/*.cxx src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps GaudiKernel MagFieldInterfaces TileEvent TileByteStreamLib TrigT2CaloCommonLib TrigInDetEvent TrigMuonEvent TrigInterfacesLib TrigTimeAlgsLib CaloIdentifier AthenaKernel AthenaMonitoringLib RegionSelectorLib ByteStreamCnvSvcBaseLib ByteStreamData GeneratorObjects TrigSteeringEvent TrigT1Interfaces ) + LINK_LIBRARIES AthenaBaseComps AthenaKernel ByteStreamCnvSvcBaseLib ByteStreamData CaloIdentifier CxxUtils GaudiKernel GeneratorObjects MagFieldInterfaces RegionSelectorLib TileByteStreamLib TileEvent TrigInDetEvent TrigInDetToolInterfacesLib TrigInterfacesLib TrigMuonEvent TrigSteeringEvent TrigT1Interfaces TrigT2CaloCommonLib TrigTimeAlgsLib ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) diff --git a/Trigger/TrigAlgorithms/TrigTileMuId/python/TrigTileLookForMuAlgConfig.py b/Trigger/TrigAlgorithms/TrigTileMuId/python/TrigTileLookForMuAlgConfig.py index ace6a5264b60ed4913876af98e8f050652989d2c..db7f38cba623eef2e486f7d486f8e18c2b11eb99 100755 --- a/Trigger/TrigAlgorithms/TrigTileMuId/python/TrigTileLookForMuAlgConfig.py +++ b/Trigger/TrigAlgorithms/TrigTileMuId/python/TrigTileLookForMuAlgConfig.py @@ -1,13 +1,12 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration - +from TrigTileMuId import TrigTileMuIdConf from AthenaCommon.SystemOfUnits import MeV - -class TrigTileLookForMuAlg_L2(TrigTileLookForMuAlg): +class TrigTileLookForMuAlg_L2(TrigTileMuIdConf.TrigTileLookForMuAlg): __slot__ = [] def __init__(self, name='TrigTileLookForMuAlg_L2'): - TrigTileLookForMuAlg.__init__(self, name) + TrigTileMuIdConf.TrigTileLookForMuAlg.__init__(self, name) #self.ReadRoIsFromL1 = False self.ReadRoIsFromL1 = True @@ -123,10 +122,10 @@ class TrigTileLookForMuAlg_L2(TrigTileLookForMuAlg): self.AthenaMonTools = [ time, cosmic, validation, online ] -class TrigTileLookForMuAlg_All(TrigTileLookForMuAlg): +class TrigTileLookForMuAlg_All(TrigTileMuIdConf.TrigTileLookForMuAlg): __slot__ = [] def __init__(self, name='TrigTileLookForMuAlg_All'): - TrigTileLookForMuAlg.__init__(self, name) + TrigTileMuIdConf.TrigTileLookForMuAlg.__init__(self, name) #self.ReadRoIsFromL1 = False self.ReadRoIsFromL1 = True diff --git a/Trigger/TrigAlgorithms/TrigTileMuId/python/TrigTileMuFexConfig.py b/Trigger/TrigAlgorithms/TrigTileMuId/python/TrigTileMuFexConfig.py index b6865f2149fd340d9e7bce09a77ac6986eadfdf4..a4bf841f2a42a736f3fddecff7204ead7e963f3e 100755 --- a/Trigger/TrigAlgorithms/TrigTileMuId/python/TrigTileMuFexConfig.py +++ b/Trigger/TrigAlgorithms/TrigTileMuId/python/TrigTileMuFexConfig.py @@ -1,12 +1,9 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -#from TrigTileMuId.TrigTileMuIdConf import TrigTileMuFex -from AthenaCommon.GlobalFlags import globalflags -from AthenaCommon.AppMgr import ServiceMgr -from TrigTileMuId.TrigTileMuIdMonitoring import * +from TrigTileMuId import TrigTileMuIdMonitoring +from TrigTileMuId import TrigTileMuIdConf - -class TrigTileMuFexConfig (TrigTileMuFex): +class TrigTileMuFexConfig (TrigTileMuIdConf.TrigTileMuFex): __slot__ = [] def __new__( cls, *args, **kwargs ): @@ -21,7 +18,7 @@ class TrigTileMuFexConfig (TrigTileMuFex): def __init__(self, name, *args, **kwargs ): super( TrigTileMuFexConfig, self ).__init__( name ) - TrigTileMuFex.__init__(self, name) + TrigTileMuIdConf.TrigTileMuFex.__init__(self, name) self.UseAthenaFieldService = True @@ -41,14 +38,14 @@ class TrigTileMuFexConfig (TrigTileMuFex): self.DelPhi_Cut = 0.2 self.DelEta_Cut = 0.1 self.Pt_Cut = 2000.0 - # Unit(Pt) : MeV + # Unit(Pt) : MeV self.GetTruthMuon = False #self.GetTruthMuon = True - validation = TrigTileMuFexValidationMonitoring() - online = TrigTileMuFexOnlineMonitoring() - cosmic = TrigTileMuFexCosmicMonitoring() + validation = TrigTileMuIdMonitoring.TrigTileMuFexValidationMonitoring() + online = TrigTileMuIdMonitoring.TrigTileMuFexOnlineMonitoring() + cosmic = TrigTileMuIdMonitoring.TrigTileMuFexCosmicMonitoring() from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig time = TrigTimeHistToolConfig("Time") diff --git a/Trigger/TrigAlgorithms/TrigTileMuId/python/TrigTileRODMuAlgConfig.py b/Trigger/TrigAlgorithms/TrigTileMuId/python/TrigTileRODMuAlgConfig.py index 2dacb30c122df3b008c44e1ae672ad74188ef97c..6e0088523f7578b327f0225ba0ee7c36e72aa9c3 100755 --- a/Trigger/TrigAlgorithms/TrigTileMuId/python/TrigTileRODMuAlgConfig.py +++ b/Trigger/TrigAlgorithms/TrigTileMuId/python/TrigTileRODMuAlgConfig.py @@ -1,10 +1,11 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +from TrigTileMuId import TrigTileMuIdConf -class TrigTileRODMuAlg_L2(TrigTileRODMuAlg): +class TrigTileRODMuAlg_L2(TrigTileMuIdConf.TrigTileRODMuAlg): __slot__ = [] def __init__(self, name='TrigTileRODMuAlg_L2'): - TrigTileRODMuAlg.__init__(self, name) + TrigTileMuIdConf.TrigTileRODMuAlg.__init__(self, name) self.ReadRoIsFromL1 = True #self.ReadRoIsFromL1 = False @@ -44,10 +45,10 @@ class TrigTileRODMuAlg_L2(TrigTileRODMuAlg): self.AthenaMonTools = [ time, cosmic, validation, online ] -class TrigTileRODMuAlg_All(TrigTileRODMuAlg): +class TrigTileRODMuAlg_All(TrigTileMuIdConf.TrigTileRODMuAlg): __slot__ = [] def __init__(self, name='TrigTileRODMuAlg_All'): - TrigTileRODMuAlg.__init__(self, name) + TrigTileMuIdConf.TrigTileRODMuAlg.__init__(self, name) self.ReadRoIsFromL1 = True #self.ReadRoIsFromL1 = False diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/CMakeLists.txt b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/CMakeLists.txt index 9784c88529288d930b788cea79cb150312c59f05..9fd5e63a89fec886480ffdcc13485d048d8ea5b9 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/CMakeLists.txt +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/CMakeLists.txt @@ -1,127 +1,116 @@ -################################################################################ -# Package: TrigInDetAnalysisUser -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigInDetAnalysisUser ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PRIVATE - Trigger/TrigAnalysis/TrigInDetAnalysis - Trigger/TrigAnalysis/TrigInDetAnalysisExample - Trigger/TrigAnalysis/TrigInDetAnalysisUtils ) - # External dependencies: -find_package( ROOT COMPONENTS Graf Gpad Cint Core Tree MathCore Hist RIO pthread ) - -include_directories(Resplot/src Readcards/src) +find_package( ROOT COMPONENTS Core Hist MathCore Graf Gpad RIO Tree ) -# Component(s) in the package: +# Libraries in the package: atlas_add_root_dictionary( Resplot - ResplotDictSource - ROOT_HEADERS Resplot/src/Resplot.h - EXTERNAL_PACKAGES ROOT ) + ResplotDictSource + ROOT_HEADERS Resplot/src/Resplot.h + EXTERNAL_PACKAGES ROOT ) atlas_add_library( Resplot - Resplot/src/Resplot.cxx - Resplot/src/generate.cxx - Resplot/src/rmsFrac.cxx - ${ResplotDictSource} - NO_PUBLIC_HEADERS - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES TrigInDetAnalysisExampleLib - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis TrigInDetAnalysisUtils ) + Resplot/src/*.h Resplot/src/Resplot.cxx Resplot/src/generate.cxx + Resplot/src/rmsFrac.cxx ${ResplotDictSource} + NO_PUBLIC_HEADERS + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ) +target_include_directories( Resplot PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Resplot/src> ) atlas_add_library( Readcards - Readcards/src/IReadCards.cxx - Readcards/src/ReadCards.cxx - Readcards/src/Value.cxx - Readcards/src/utils.cxx - NO_PUBLIC_HEADERS - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES TrigInDetAnalysisExampleLib Resplot - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis TrigInDetAnalysisUtils ) + Readcards/src/*.h Readcards/src/IReadCards.cxx Readcards/src/ReadCards.cxx + Readcards/src/Value.cxx Readcards/src/utils.cxx + NO_PUBLIC_HEADERS ) +target_include_directories( Readcards PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Readcards/src> ) atlas_add_library( TIDA - Analysis/src/ConfAnalysis.cxx - Analysis/src/ConfVtxAnalysis.cxx - Analysis/src/PurityAnalysis.cxx - Analysis/src/globals.cxx - NO_PUBLIC_HEADERS - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES TrigInDetAnalysisExampleLib Resplot Readcards - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis TrigInDetAnalysisUtils ) + Analysis/src/ConfAnalysis.h Analysis/src/ConfAnalysis.cxx + Analysis/src/ConfVtxAnalysis.h Analysis/src/ConfVtxAnalysis.cxx + Analysis/src/PurityAnalysis.h Analysis/src/PurityAnalysis.cxx + Analysis/src/globals.h Analysis/src/globals.cxx + NO_PUBLIC_HEADERS + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis + TrigInDetAnalysisExampleLib Resplot Readcards ) +target_include_directories( TIDA PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Analysis/src> ) atlas_add_library( TIDAcomputils - Analysis/src/computils.cxx - NO_PUBLIC_HEADERS - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES TrigInDetAnalysisExampleLib Resplot Readcards TIDA - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis TrigInDetAnalysisUtils ) - + Analysis/src/computils.h Analysis/src/computils.cxx + NO_PUBLIC_HEADERS + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis Readcards ) +target_include_directories( TIDAcomputils PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Analysis/src> ) + +# Executables in the package: atlas_add_executable( TIDAreader - Analysis/src/reader.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis TrigInDetAnalysisExampleLib TrigInDetAnalysisUtils Resplot Readcards TIDA TIDAcomputils ) + Analysis/src/reader.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis Readcards ) atlas_add_executable( TIDArdict - Analysis/src/rmain.cxx - Analysis/src/TagNProbe.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis TrigInDetAnalysisExampleLib TrigInDetAnalysisUtils Resplot Readcards TIDA TIDAcomputils ) + Analysis/src/rmain.cxx Analysis/src/TagNProbe.h Analysis/src/TagNProbe.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis TrigInDetAnalysisUtils + TrigInDetAnalysisExampleLib Resplot Readcards TIDA TIDAcomputils ) atlas_add_executable( TIDAcomparitor - Analysis/src/comparitor.cxx - Analysis/src/AtlasStyle.cxx - Analysis/src/AtlasLabels.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis TrigInDetAnalysisExampleLib TrigInDetAnalysisUtils Resplot Readcards TIDA TIDAcomputils ) + Analysis/src/comparitor.cxx + Analysis/src/AtlasStyle.h Analysis/src/AtlasStyle.cxx + Analysis/src/AtlasLabels.h Analysis/src/AtlasLabels.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis Resplot Readcards + TIDAcomputils ) atlas_add_executable( TIDAcpucost - Analysis/src/cpucost.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis TrigInDetAnalysisExampleLib TrigInDetAnalysisUtils Resplot Readcards TIDA TIDAcomputils ) + Analysis/src/cpucost.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} Readcards TIDAcomputils ) atlas_add_executable( TIDAchains - Analysis/src/chains.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis TrigInDetAnalysisExampleLib TrigInDetAnalysisUtils Resplot Readcards TIDA TIDAcomputils ) + Analysis/src/chains.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ) atlas_add_executable( TIDAskim - Analysis/src/skim.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis TrigInDetAnalysisExampleLib TrigInDetAnalysisUtils Resplot Readcards TIDA TIDAcomputils ) + Analysis/src/skim.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis Readcards ) atlas_add_executable( TIDAfastadd - Analysis/src/fastadd.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis TrigInDetAnalysisExampleLib TrigInDetAnalysisUtils Resplot Readcards TIDA TIDAcomputils ) + Analysis/src/fastadd.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ) atlas_add_executable( TIDArefit - Analysis/src/refit.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis TrigInDetAnalysisExampleLib TrigInDetAnalysisUtils Resplot Readcards TIDA TIDAcomputils ) + Analysis/src/refit.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis Resplot ) atlas_add_executable( TIDAlistroot - Analysis/src/listroot.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis TrigInDetAnalysisExampleLib TrigInDetAnalysisUtils Resplot Readcards TIDA TIDAcomputils ) + Analysis/src/listroot.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis Readcards ) atlas_add_executable( TIDAmakeSmallRefFile - Analysis/src/makeSmallRefFile.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis TrigInDetAnalysisExampleLib TrigInDetAnalysisUtils Resplot Readcards TIDA TIDAcomputils ) + Analysis/src/makeSmallRefFile.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ) atlas_add_executable( TIDAruntool - Analysis/src/runtool.cxx - Analysis/src/computils.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ) + Analysis/src/runtool.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} TIDAcomputils ) atlas_add_executable( TIDAsb - Analysis/src/chainparser.cxx - INCLUDE_DIRS - LINK_LIBRARIES Readcards ) + Analysis/src/chainparser.cxx + LINK_LIBRARIES Readcards ) # Disable naming convention checker. diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/CMakeLists.txt b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/CMakeLists.txt index 8137f81113fc726eb3151ca01ef5c56a63f55980..e5e58b3127f2373865d1c1e80896b6338dbf4580 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/CMakeLists.txt +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/CMakeLists.txt @@ -1,43 +1,18 @@ -################################################################################ -# Package: TrigInDetAnalysisUtils -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigInDetAnalysisUtils ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/StoreGate - GaudiKernel - PhysicsAnalysis/TruthParticleID/McParticleEvent - Reconstruction/Particle - Reconstruction/MuonIdentification/muonEvent - Reconstruction/egamma/egammaEvent - Reconstruction/tauEvent - Event/xAOD/xAODMuon - Event/xAOD/xAODEgamma - Event/xAOD/xAODTau - Event/xAOD/xAODTruth - Tracking/TrkEvent/TrkParameters - Tracking/TrkEvent/TrkTrack - Tracking/TrkEvent/TrkTrackSummary - Tracking/TrkExtrapolation/TrkExUtils - Tracking/TrkTools/TrkParticleCreator - Tracking/TrkTools/TrkToolInterfaces - Trigger/TrigAnalysis/TrigDecisionTool - Trigger/TrigAnalysis/TrigInDetAnalysis - Trigger/TrigEvent/TrigInDetEvent - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigTruthEvent/TrigInDetTruthEvent - Generators/AtlasHepMC ) - # External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) +find_package( ROOT COMPONENTS Core MathCore ) # Component(s) in the package: atlas_add_library( TrigInDetAnalysisUtils - src/*.cxx - PUBLIC_HEADERS TrigInDetAnalysisUtils - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasHepMCLib GaudiKernel McParticleEvent muonEvent Particle egammaEvent tauEvent TrkParameters TrkTrack TrkTrackSummary TrkExUtils TrkToolInterfaces TrigInDetAnalysis TrigInDetEvent TrigSteeringEvent TrigInDetTruthEvent StoreGateLib SGtests TrigDecisionToolLib ) - + TrigInDetAnalysisUtils/*.h src/*.cxx + PUBLIC_HEADERS TrigInDetAnalysisUtils + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel McParticleEvent Particle + muonEvent egammaEvent tauEvent xAODMuon xAODEgamma xAODTau xAODTruth + TrkParameters TrkTrack TrkToolInterfaces TrigDecisionToolLib + TrigInDetAnalysis TrigInDetEvent TrigSteeringEvent TrigInDetTruthEvent + AtlasHepMCLib ) diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/T_AnalysisConfig.h b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/T_AnalysisConfig.h index 6b20b7cd5da9f79846c6e5c485247d5b6024000b..69ec81e65114b3626acbd8e130f5e4ab9d6364b5 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/T_AnalysisConfig.h +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/T_AnalysisConfig.h @@ -3,9 +3,9 @@ ** @file T_AnalysisConfig.h ** ** @author mark sutton - ** @date Fri 11 Jan 2019 07:06:39 CET + ** @date Fri 11 Jan 2019 07:06:39 CET ** - ** Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + ** Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration **/ @@ -18,10 +18,8 @@ #include <map> #include "GaudiKernel/IToolSvc.h" -#include "GaudiKernel/MsgStream.h" #include "GaudiKernel/ITHistSvc.h" // #include "GaudiKernel/AlgFactory.h" -#include "StoreGate/StoreGateSvc.h" #include "TrigDecisionTool/TrigDecisionTool.h" @@ -50,7 +48,6 @@ #endif class MsgSvc; -class StoreGateSvc; // class TrackAssociator; // class Converter; @@ -220,7 +217,7 @@ public: void addSelectionFilter(TrackFilter* filter) { m_filters[2].push_back(filter); } // Initialize, execute and finalize generic methods - virtual void initialize(Provider* p, ToolHandle<Trig::TrigDecisionTool>* tdt ) { + virtual void initialize(Provider* p, ToolHandle<Trig::TrigDecisionTool>* tdt ) { m_provider = p; m_tdt = tdt; if ( m_tdt==0 ) m_analysis->initialise(); @@ -282,18 +279,18 @@ public: void keepAllEvents( bool b ) { m_keepAllEvents = b; } - void setUseHighestPT( bool b ) { m_useHighestPT=b; } - bool getUseHighestPT() const { return m_useHighestPT; } + void setUseHighestPT( bool b ) { m_useHighestPT=b; } + bool getUseHighestPT() const { return m_useHighestPT; } - void setVtxIndex( int i ) { m_vtxIndex=i; } - int getVtxIndex() const { return m_vtxIndex; } + void setVtxIndex( int i ) { m_vtxIndex=i; } + int getVtxIndex() const { return m_vtxIndex; } bool filterOnRoi() const { return m_filterOnRoi; } bool setFilterOnRoi(bool b) { return m_filterOnRoi=b; } - void setRequireDecision(bool b) { m_requireDecision=b; } - bool requireDecision() const { return m_requireDecision; } - + void setRequireDecision(bool b) { m_requireDecision=b; } + bool requireDecision() const { return m_requireDecision; } + protected: virtual void loop() = 0; @@ -310,8 +307,8 @@ protected: /// until it has been properly debugged, then it can be removed // std::cout << "try " << key << "\t" << m_provider->evtStore()->template transientContains<Collection>(key) << std::endl; - /// will not use the te name here, but keep it on just the - /// same for the time being, for subsequent development + /// will not use the te name here, but keep it on just the + /// same for the time being, for subsequent development std::string key_collection = key; std::string key_tename = ""; size_t pos = key_collection.find("/"); @@ -333,18 +330,18 @@ protected: template<class Collection> - bool selectTracks( TrigTrackSelector* selector, - // const TrigCompositeUtils::LinkInfo<TrigRoiDescriptorCollection> roi_link, + bool selectTracks( TrigTrackSelector* selector, + // const TrigCompositeUtils::LinkInfo<TrigRoiDescriptorCollection> roi_link, const ElementLink<TrigRoiDescriptorCollection>& roi_link, const std::string& key="" ) { - /// will need this printout for debugging the feature access, so leave this commented + /// will need this printout for debugging the feature access, so leave this commented /// until it has been properly debugged, then it can be removed // std::cout << "try " << key << "\t" << m_provider->evtStore()->template transientContains<Collection>(key) << std::endl; - /// will not use the te name here, but keep it on just the - /// same for the time being, for subsequent development + /// will not use the te name here, but keep it on just the + /// same for the time being, for subsequent development std::string key_collection = key; std::string key_tename = ""; size_t pos = key_collection.find("/"); @@ -353,13 +350,13 @@ protected: key_tename = key.substr( 0, pos ); } - std::pair< typename Collection::const_iterator, + std::pair< typename Collection::const_iterator, typename Collection::const_iterator > itrpair; SG::ReadHandle<Collection> handle(key); itrpair = (*m_tdt)->associateToEventView( handle, roi_link ); - + if ( itrpair.first != itrpair.second ) { selector->selectTracks( itrpair.first, itrpair.second ); return true; @@ -522,14 +519,14 @@ protected: std::vector< Trig::Feature<Collection> > trackcollections = citr->get<Collection>( key, TrigDefs::alsoDeactivateTEs ); std::vector<double> v; if ( !trackcollections.empty() ) { - // NB!! a combination should never have more than one entry for a track collection from a single algorithm, - // if ( trackcollections.size()>1 ) std::cerr << "SUTT OH NO!!!!!!!!" << endmsg; + // NB!! a combination should never have more than one entry for a track collection from a single algorithm, + // if ( trackcollections.size()>1 ) std::cerr << "SUTT OH NO!!!!!!!!" << endmsg; for ( unsigned ifeat=0 ; ifeat<trackcollections.size() ; ifeat++ ) { - // std::cout << "selectTracks() ifeat=" << ifeat << "\tkey " << key << std::endl; + // std::cout << "selectTracks() ifeat=" << ifeat << "\tkey " << key << std::endl; Trig::Feature<Collection> trackfeature = trackcollections.at(ifeat); if ( !trackfeature.empty() ) { - // m_provider->msg(MSG::DEBUG) << "TDT TrackFeature->size() " << trackfeature.cptr()->size() << " (" << key << ")" << endmsg; - // actually select the tracks from this roi at last!! + // m_provider->msg(MSG::DEBUG) << "TDT TrackFeature->size() " << trackfeature.cptr()->size() << " (" << key << ")" << endmsg; + // actually select the tracks from this roi at last!! const Collection* trigtracks = trackfeature.cptr(); typename Collection::const_iterator trackitr = trigtracks->begin(); @@ -560,8 +557,8 @@ protected: //////////////////////////////////////////////////////////////////////////////////////////// unsigned processElectrons( TrigTrackSelector& selectorRef, std::vector<TrackTrigObject>* elevec=0, - const unsigned int selection=0, - bool raw_track=false, + const unsigned int selection=0, + bool raw_track=false, double ETOffline=0, # ifdef XAODTRACKING_TRACKPARTICLE_H const std::string& containerName = "Electrons" @@ -582,12 +579,12 @@ protected: const Container* container = 0; - + if( ! m_provider->evtStore()->template contains<Container>(containerName) ) { m_provider->msg(MSG::WARNING) << "Error No Electron Container " << containerName << " !" << endmsg; return 0; } - + StatusCode sc=m_provider->evtStore()->retrieve( container, containerName); if( sc.isFailure() || !container ) { m_provider->msg(MSG::WARNING) << "Error retrieving container: " << containerName << " !" << endmsg; @@ -617,7 +614,7 @@ protected: good_electron = TIDA::isGoodOffline( *(*elec)); # endif - if (good_electron) { + if (good_electron) { const xAOD::Electron_v1& eleduff = *(*elec); long unsigned eleid = (unsigned long)(&eleduff) ; TrackTrigObject eleobj = TrackTrigObject( (*elec)->eta(), @@ -626,13 +623,13 @@ protected: 0, (*elec)->type(), eleid ); - + bool trk_added ; if ( raw_track ) trk_added = selectorRef.selectTrack( xAOD::EgammaHelpers::getOriginalTrackParticle( *elec ) ); else trk_added = selectorRef.selectTrack( (*elec)->trackParticle() ); - + if (trk_added) eleobj.addChild( selectorRef.tracks().back()->id() ); - if (elevec) elevec->push_back( eleobj ); + if (elevec) elevec->push_back( eleobj ); } } @@ -644,7 +641,7 @@ protected: //////////////////////////////////////////////////////////////////////////////////////////// /// select offlinqe muons //////////////////////////////////////////////////////////////////////////////////////////// - unsigned processMuons( TrigTrackSelector& selectorRef, const unsigned int selection=0, + unsigned processMuons( TrigTrackSelector& selectorRef, const unsigned int selection=0, double ETOffline=0, # ifdef XAODTRACKING_TRACKPARTICLE_H const std::string& containerName = "Muons" @@ -712,9 +709,9 @@ unsigned processTaus( TrigTrackSelector& selectorRef, const std::string& containerName = "TauRecContainer" # endif ) { - + # ifdef XAODTRACKING_TRACKPARTICLE_H - typedef xAOD::TauJetContainer Container; + typedef xAOD::TauJetContainer Container; # else typedef Analysis::TauJetContainer Container; # endif @@ -731,7 +728,7 @@ unsigned processTaus( TrigTrackSelector& selectorRef, m_provider->msg(MSG::WARNING) << " Offline taus not found" << endmsg; return 0; } - + StatusCode sc = m_provider->evtStore()->retrieve( container, containerName); if (sc != StatusCode::SUCCESS) { @@ -759,7 +756,7 @@ unsigned processTaus( TrigTrackSelector& selectorRef, # endif # else - unsigned N = (*tau)->numTrack(); + unsigned N = (*tau)->numTrack(); # endif @@ -770,8 +767,8 @@ unsigned processTaus( TrigTrackSelector& selectorRef, good_tau = TIDA::isGoodOffline( *(*tau), requireNtracks, EtCutOffline ); # endif - // std::cout << "SUTT tau ntracks: " << N << "\tgoodtau: " << good_tau << "\tpt: " << (*tau)->p4().Et() << "\t3prong: " << doThreeProng << std::endl; - + // std::cout << "SUTT tau ntracks: " << N << "\tgoodtau: " << good_tau << "\tpt: " << (*tau)->p4().Et() << "\t3prong: " << doThreeProng << std::endl; + if (good_tau){ const xAOD::TauJet_v3& duff = *(*tau); long unsigned tauid = (unsigned long)(&duff) ; @@ -781,10 +778,10 @@ unsigned processTaus( TrigTrackSelector& selectorRef, 0, (*tau)->type(), tauid ); - + bool trk_added; for ( unsigned i=N ; i-- ; ) { -# ifdef XAODTAU_TAUTRACK_H +# ifdef XAODTAU_TAUTRACK_H trk_added = selectorRef.selectTrack((*tau)->track(i)->track()); # else trk_added = selectorRef.selectTrack((*tau)->track(i)); @@ -806,8 +803,6 @@ protected: Provider* m_provider; - // MsgStream* m_msg; - // StoreGateSvc* m_sg; ToolHandle<Trig::TrigDecisionTool>* m_tdt; // TrigInDetAnalysis tools @@ -853,7 +848,7 @@ protected: bool m_keepAllEvents; bool m_useHighestPT; - + int m_vtxIndex; bool m_filterOnRoi; @@ -866,4 +861,3 @@ protected: #endif // TrigInDetAnalysisUtils_T_AnalysisConfig_H - diff --git a/Trigger/TrigHypothesis/TrigCaloHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigCaloHypo/CMakeLists.txt index 1e8016e2e7cb3095ea7e511f86ae8063447adc4b..b5c0d223a066b6930e2b61ad6c9b2c7234d87dc0 100644 --- a/Trigger/TrigHypothesis/TrigCaloHypo/CMakeLists.txt +++ b/Trigger/TrigHypothesis/TrigCaloHypo/CMakeLists.txt @@ -1,38 +1,16 @@ - -################################################################################ -# Package: TrigCaloHypo -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigCaloHypo ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PRIVATE - Calorimeter/CaloInterface - GaudiKernel - Trigger/TrigEvent/TrigCaloEvent - Trigger/TrigEvent/TrigParticle - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigSteer/TrigInterfaces - Trigger/TrigTools/TrigTimeAlgs - Calorimeter/CaloGeoHelpers - Event/EventKernel - Event/FourMomUtils - Event/xAOD/xAODCaloEvent - Event/xAOD/xAODEventInfo - LArCalorimeter/LArRecEvent - LArCalorimeter/LArRecConditions - Reconstruction/Jet/JetUtils ) - # External dependencies: -find_package( CLHEP ) find_package( tdaq-common COMPONENTS hltinterface ) # Component(s) in the package: atlas_add_component( TrigCaloHypo src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ${CLHEP_LIBRARIES} xAODJet GaudiKernel JetEvent TrigCaloEvent TrigParticle TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib CaloGeoHelpers EventKernel FourMomUtils xAODCaloEvent xAODEventInfo LArRecEvent LArRecConditions JetUtils ) + INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} + LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} CaloInterfaceLib GaudiKernel LArRecConditions LArRecEvent StoreGateLib TrigCaloEvent TrigInterfacesLib TrigSteeringEvent TrigTimeAlgsLib xAODCaloEvent xAODEventInfo ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) diff --git a/Trigger/TrigHypothesis/TrigCaloHypo/python/TrigCaloHypoConfig.py b/Trigger/TrigHypothesis/TrigCaloHypo/python/TrigCaloHypoConfig.py index 89a470ae43e1a2867e5e8138016788d6566b52a9..3c37b071bf7cba048557fce61d570ad9ad8d57b6 100644 --- a/Trigger/TrigHypothesis/TrigCaloHypo/python/TrigCaloHypoConfig.py +++ b/Trigger/TrigHypothesis/TrigCaloHypo/python/TrigCaloHypoConfig.py @@ -1,12 +1,10 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaCommon.SystemOfUnits import GeV from TrigCaloHypo.TrigCaloHypoConf import TrigEFCaloHypoNoise from LArCellRec.LArCellRecConf import LArNoisyROTool -from LArBadChannelTool.LArBadChannelToolConf import LArBadChanLegacyTool from IOVDbSvc.CondDB import conddb -from AthenaCommon.AppMgr import ServiceMgr as svcMgr from LArCabling.LArCablingAccess import LArOnOffIdMapping LArOnOffIdMapping() diff --git a/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigEFCaloHypoNoise.cxx b/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigEFCaloHypoNoise.cxx index f80bd2d5b6b9c13795d73c39c682871d996ce82f..ebfa1bb19abe8149208167327190dd0687db5228 100755 --- a/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigEFCaloHypoNoise.cxx +++ b/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigEFCaloHypoNoise.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // ******************************************************************** @@ -20,6 +20,8 @@ #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/StatusCode.h" #include "GaudiKernel/ListItem.h" +#include "GaudiKernel/SystemOfUnits.h" + #include "xAODEventInfo/EventInfo.h" #include "LArRecEvent/LArNoisyROSummary.h" @@ -32,7 +34,6 @@ #include "hltinterface/IInfoRegister.h" #include "hltinterface/ContainerFactory.h" -#include "CLHEP/Units/SystemOfUnits.h" class ISvcLocator; @@ -43,7 +44,7 @@ class ISvcLocator; TrigEFCaloHypoNoise::TrigEFCaloHypoNoise(const std::string& name, ISvcLocator* pSvcLocator): HLT::HypoAlgo(name, pSvcLocator), m_isInterface(false), m_noisyROTool("",this),m_hasFebs(false) { - declareProperty("Etcut", m_EtCut = 40*CLHEP::GeV); // Default: 40 GeV + declareProperty("Etcut", m_EtCut = 40*Gaudi::Units::GeV); // Default: 40 GeV declareProperty("doMonitoring", m_doMonitoring = false ); declareProperty("AcceptAll", m_acceptAll=false); declareProperty("NoiseTool", m_noisyROTool); diff --git a/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigL2JetHypo.cxx b/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigL2JetHypo.cxx index a5e8d2f8164937a4c0710eb3bbd05d6b751e0c2e..4f482d2dc17c91df170aa07ce57c093f5f8d57b7 100644 --- a/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigL2JetHypo.cxx +++ b/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigL2JetHypo.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // ******************************************************************** @@ -14,6 +14,7 @@ #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/IToolSvc.h" #include "GaudiKernel/StatusCode.h" +#include "GaudiKernel/SystemOfUnits.h" //#include "TrigSteeringEvent/TriggerElement.h" @@ -24,7 +25,6 @@ #include "TrigL2JetHypo.h" -#include "CLHEP/Units/SystemOfUnits.h" class ISvcLocator; @@ -35,7 +35,7 @@ class ISvcLocator; TrigL2JetHypo::TrigL2JetHypo(const std::string& name, ISvcLocator* pSvcLocator): HLT::HypoAlgo(name, pSvcLocator) { - declareProperty("Etcut_L2", m_EtCut_L2 = 20*CLHEP::GeV, "cut value for L2 jet et"); // Default: 20 GeV + declareProperty("Etcut_L2", m_EtCut_L2 = 20*Gaudi::Units::GeV, "cut value for L2 jet et"); // Default: 20 GeV declareProperty("doMonitoring_L2", m_doMonitoring = false, "switch on/off monitoring" ); declareProperty("AcceptAll", m_acceptAll=false); //declareProperty("histoPath", m_path = "/stat/Monitoring/EventFilter" ); @@ -52,9 +52,9 @@ TrigL2JetHypo::TrigL2JetHypo(const std::string& name, ISvcLocator* pSvcLocator): declareProperty("applyCleaningToHighEtJets", m_applyCleaningToHighEtJets = true); declareProperty("applyCleaningToLowEtJets", m_applyCleaningToLowEtJets = true); // Et-threshold: if(applyCleaningToHighEtJets==false) then don't apply cleaning cuts to jets with Et > highEtThreshold: - declareProperty("cleaningHighEtThreshold", m_cleaningHighEtThreshold = 1000.*CLHEP::GeV); + declareProperty("cleaningHighEtThreshold", m_cleaningHighEtThreshold = 1000.*Gaudi::Units::GeV); // Et-threshold: if(applyCleaningToLowEtJets==false) then don't apply cleaning cuts to jets with Et < lowEtThreshold: - declareProperty("cleaningLowEtThreshold", m_cleaningLowEtThreshold = 20.*CLHEP::GeV); + declareProperty("cleaningLowEtThreshold", m_cleaningLowEtThreshold = 20.*Gaudi::Units::GeV); // threshold for number of leading cells in hecf > m_leadingCellsThr && nLeadingCells <= m_leadingCellsThr cut: declareProperty("leadingCellsThr", m_leadingCellsThr = 1); // hecf threshold for cut in combination with nLeadingCells (i.e. hecf > m_hecfThrN && nLeadingCells <= m_leadingCellsThr): diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigEgammaHypo/CMakeLists.txt index 578cef4aa119ddca212e1e6a5db691dae3dbe7fa..32ff89c5af045076ceaae0ccd3cfba7535556814 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/CMakeLists.txt +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/CMakeLists.txt @@ -5,79 +5,28 @@ # Declare the package name: atlas_subdir( TrigEgammaHypo ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - Calorimeter/CaloUtils - Control/AthLinks - Control/StoreGate - Control/AthenaMonitoringKernel - Event/xAOD/xAODCaloEvent - Event/xAOD/xAODEgamma - Event/xAOD/xAODTracking - Event/xAOD/xAODTrigCalo - Event/xAOD/xAODTrigEgamma - Event/xAOD/xAODTrigger - Event/xAOD/xAODTrigRinger - GaudiKernel - LumiBlock/LumiBlockComps - Tools/PathResolver - PhysicsAnalysis/AnalysisCommon/PATCore - PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces - Reconstruction/egamma/egammaInterfaces - Tracking/TrkDetDescr/TrkSurfaces - Tracking/TrkEvent/VxVertex - Trigger/TrigEvent/TrigCaloEvent - Trigger/TrigEvent/TrigInDetEvent - Trigger/TrigEvent/TrigParticle - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigSteer/TrigInterfaces - Trigger/TrigT1/TrigT1Interfaces - Trigger/TrigTools/TrigTimeAlgs - Trigger/TrigHypothesis/TrigMultiVarHypo - PRIVATE - Calorimeter/CaloEvent - Control/CxxUtils - Event/xAOD/xAODEgammaCnv - Reconstruction/RecoTools/ITrackToVertex - Reconstruction/RecoTools/RecoToolInterfaces - Reconstruction/egamma/egammaEvent - Reconstruction/egamma/egammaMVACalib - Tracking/TrkEvent/TrkCaloExtension - Trigger/TrigAlgorithms/TrigCaloRec - Trigger/TrigEvent/TrigMissingEtEvent - Trigger/TrigEvent/TrigNavigation - Trigger/TrigSteer/DecisionHandling - Trigger/TrigSteer/TrigCompositeUtils - Control/AthViews - Control/AthContainers ) - # External dependencies: -find_package( CLHEP ) find_package( ROOT COMPONENTS Core MathCore Hist ) # Component(s) in the package: atlas_add_component( TrigEgammaHypo src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloUtilsLib AthLinks AthenaBaseComps StoreGateLib SGtests AthenaMonitoringKernelLib TrigMultiVarHypoLib xAODTrigRinger xAODCaloEvent xAODEgamma xAODTracking xAODTrigCalo xAODTrigEgamma GaudiKernel LumiBlockCompsLib PathResolver PATCoreLib EgammaAnalysisInterfacesLib TrkSurfaces VxVertex TrigCaloEvent TrigInDetEvent TrigParticle TrigSteeringEvent TrigInterfacesLib TrigT1Interfaces TrigTimeAlgsLib CaloEvent CxxUtils ITrackToVertex RecoToolInterfaces egammaEvent egammaMVACalibLib TrkCaloExtension TrigCaloRecLib TrigMissingEtEvent TrigNavigationLib DecisionHandlingLib AthViews TrigCompositeUtilsLib ) + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks AthViews AthenaBaseComps AthenaMonitoringKernelLib CaloDetDescrLib CaloEvent CaloUtilsLib DecisionHandlingLib EgammaAnalysisInterfacesLib GaudiKernel LumiBlockCompsLib LumiBlockData PATCoreLib RecoToolInterfaces StoreGateLib TrigCaloRecLib TrigCompositeUtilsLib TrigInterfacesLib TrigMissingEtEvent TrigMultiVarHypoLib TrigNavigationLib TrigSteeringEvent TrigT1Interfaces TrigTimeAlgsLib TrkCaloExtension TrkSurfaces VxVertex egammaEvent egammaInterfacesLib xAODBase xAODCaloEvent xAODEgamma xAODEgammaCnvLib xAODTracking xAODTrigCalo xAODTrigEgamma xAODTrigRinger xAODTrigger TrigParticle ) # Install files from the package: -atlas_install_headers( TrigEgammaHypo ) -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) # Unit tests: -atlas_add_test( TrigL2CaloHypoToolConfig SCRIPT python -m TrigEgammaHypo.TrigL2CaloHypoTool - POST_EXEC_SCRIPT nopost.sh ) - -atlas_add_test( TrigL2ElectronHypoToolConfig SCRIPT python -m TrigEgammaHypo.TrigL2ElectronHypoTool - POST_EXEC_SCRIPT nopost.sh ) +atlas_add_test( TrigL2CaloHypoToolConfig + SCRIPT python -m TrigEgammaHypo.TrigL2CaloHypoTool + POST_EXEC_SCRIPT nopost.sh ) -atlas_add_test( TrigL2PhotonHypoToolConfig SCRIPT python -m TrigEgammaHypo.TrigL2PhotonHypoTool - POST_EXEC_SCRIPT nopost.sh ) +atlas_add_test( TrigL2ElectronHypoToolConfig + SCRIPT python -m TrigEgammaHypo.TrigL2ElectronHypoTool + POST_EXEC_SCRIPT nopost.sh ) -# Check Python syntax: -atlas_add_test( flake8 - SCRIPT flake8 --select=ATL,F,E7,E9,W6 --enable-extension=ATL900,ATL901 ${CMAKE_CURRENT_SOURCE_DIR}/python +atlas_add_test( TrigL2PhotonHypoToolConfig + SCRIPT python -m TrigEgammaHypo.TrigL2PhotonHypoTool POST_EXEC_SCRIPT nopost.sh ) diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/doc/Doxyfile b/Trigger/TrigHypothesis/TrigEgammaHypo/doc/Doxyfile deleted file mode 100755 index 56007db0a585accad2b575a62ec31e9b02c725d9..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/doc/Doxyfile +++ /dev/null @@ -1,231 +0,0 @@ -# Doxyfile 1.5.3 - -#--------------------------------------------------------------------------- -#Project related configuration options -#--------------------------------------------------------------------------- -DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = TrigEgammaHypo -PROJECT_NUMBER = TrigEgammaHypo-00-07-66 -OUTPUT_DIRECTORY = /afs/cern.ch/user/a/ahamil/trigger/test/InstallArea/doc/TrigEgammaHypo -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = YES -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = YES -QT_AUTOBRIEF = YES -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -CPP_CLI_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -#Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -EXTRACT_ANON_NSPACES = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = YES -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -#configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text " -WARN_LOGFILE = -#--------------------------------------------------------------------------- -#configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../src ../TrigEgammaHypo ../doc ../share ../python -INPUT_ENCODING = UTF-8 -FILE_PATTERNS = *.cxx *.h *.py *.mk *.icc -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXCLUDE_SYMBOLS = -EXAMPLE_PATH = ../doc ../cmt ../share -EXAMPLE_PATTERNS = *.cxx *.html requirements *.py -EXAMPLE_RECURSIVE = YES -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -#configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = YES -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = NO -REFERENCES_RELATION = NO -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = NO -#--------------------------------------------------------------------------- -#configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -#configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -HTML_DYNAMIC_SECTIONS = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -#configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = YES -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -#configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -#configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -#configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -#configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -#configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -#Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -#Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = /afs/cern.ch/user/a/ahamil/trigger/test/InstallArea/doc/TrigEgammaHypo.tag -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -#Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -MSCGEN_PATH = -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = YES -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = YES -TEMPLATE_RELATIONS = YES -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = gif -DOT_PATH = -DOTFILE_DIRS = -DOT_GRAPH_MAX_NODES = 50 -MAX_DOT_GRAPH_DEPTH = 0 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -#Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = YES diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEFElectronHypoMonitoring.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEFElectronHypoMonitoring.py index 538a9a41fc05457a792906a5d7975e56bf9e8ed6..5fc7ed851ee20a84fb7626e69d61d540a966f61b 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEFElectronHypoMonitoring.py +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEFElectronHypoMonitoring.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig @@ -55,10 +55,6 @@ class TrigEFElectronHypoValidationMonitoring(TrigGenericMonitoringToolConfig): for c in cuts: labelsDescription += c+':' - #AT Aug2011: deactivate histogram egIsEM - outdated - #self.Histograms += [ defineHistogram('egIsEM', type='TH1I', title="EFElectronHypo isEM; Cut", - # xbins=3, xmin=0.5, xmax=3.5, labels=labelsDescription)] - self.Histograms += [ defineHistogram('El_ClusterEt', type='TH1F', title="EFElectron Hypo Cluster E_{T}; E_{T}^{em} [MeV]", xbins=50, xmin=-2000, xmax=100000) ] @@ -248,10 +244,7 @@ class TrigEFElectronHypoOnlineMonitoring(TrigGenericMonitoringToolConfig): for c in cuts: labelsDescription += c+':' - #AT Aug2011: deactivate histogram egIsEM - outdated - #self.Histograms += [ defineHistogram('egIsEM', type='TH1I', title="EFElectronHypo isEM; Cut", - # xbins=3, xmin=0.5, xmax=3.5, labels=labelsDescription)] - + self.Histograms += [ defineHistogram('El_ClusterEt', type='TH1F', title="EFElectron Hypo Cluster E_{T}; E_{T}^{em} [MeV]", xbins=50, xmin=-2000, xmax=100000) ] @@ -275,8 +268,7 @@ class TrigEFElectronHypoOnlineMonitoring(TrigGenericMonitoringToolConfig): self.Histograms += [ defineHistogram('El_PtCone20', type='TH1F', title="EFElectron Hypo Pt in a ring of DR<0.20 above noise (excluding electron PT); PT [MeV]", xbins=60, xmin=-10000, xmax=50000 ) ] - - + class TrigEFElectronHypoCosmicMonitoring(TrigGenericMonitoringToolConfig): def __init__ (self, name="TrigEFElectronHypoCosmicMonitoring"): """ defines histograms for cosmic """ @@ -336,10 +328,7 @@ class TrigEFElectronHypoCosmicMonitoring(TrigGenericMonitoringToolConfig): for c in cuts: labelsDescription += c+':' - #AT Aug2011: deactivate histogram egIsEM - outdated - #self.Histograms += [ defineHistogram('egIsEM', type='TH1I', title="EFElectronHypo isEM; Cut", - # xbins=3, xmin=0.5, xmax=3.5, labels=labelsDescription)] - + self.Histograms += [ defineHistogram('El_ClusterEt', type='TH1F', title="EFElectron Hypo Cluster E_{T}; E_{T}^{em} [MeV]", xbins=50, xmin=-2000, xmax=100000) ] diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEFPhotonHypoMonitoring.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEFPhotonHypoMonitoring.py index e33599460d5751e4961e21ef51ef78fc7cb85d28..f11b6bf077537d752afec39279ab1f88f45292c7 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEFPhotonHypoMonitoring.py +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEFPhotonHypoMonitoring.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig @@ -64,12 +64,8 @@ class TrigEFPhotonHypoValidationMonitoring(TrigGenericMonitoringToolConfig): for c in cuts: labelsDescription += c+':' - #AT Aug2011: deactivate histogram egIsEM - outdated - #self.Histograms += [ defineHistogram('egIsEM', type='TH1I', title="EFEgammaHypo isEM; Cut", - # xbins=3, xmin=0.5, xmax=3.5, labels=labelsDescription)] - self.Histograms += [ defineHistogram('Ph_ClusterEt', type='TH1F', title="EFPhoton Hypo Cluster E_{T}; E_{T}^{em} [MeV]", - xbins=50, xmin=-2000, xmax=100000) ] + xbins=50, xmin=-2000, xmax=100000) ] self.Histograms += [ defineHistogram('Ph_F1', type='TH1F', title="EFPhoton Hypo fraction of energy found in 1st em sampling;Fraction", xbins=50, xmin=-0.1, xmax=1.1 ) ] @@ -208,10 +204,6 @@ class TrigEFPhotonHypoOnlineMonitoring(TrigGenericMonitoringToolConfig): for c in cuts: labelsDescription += c+':' - #AT Aug2011: deactivate histogram egIsEM - outdated - #self.Histograms += [ defineHistogram('egIsEM', type='TH1I', title="EFEgammaHypo isEM; Cut", - # xbins=3, xmin=0.5, xmax=3.5, labels=labelsDescription)] - self.Histograms += [ defineHistogram('Ph_ClusterEt', type='TH1F', title="EFPhoton Hypo Cluster E_{T}; E_{T}^{em} [MeV]", xbins=50, xmin=-2000, xmax=100000) ] @@ -285,10 +277,6 @@ class TrigEFPhotonHypoCosmicMonitoring(TrigGenericMonitoringToolConfig): for c in cuts: labelsDescription += c+':' - #AT Aug2011: deactivate histogram egIsEM - outdated - #self.Histograms += [ defineHistogram('egIsEM', type='TH1I', title="EFEgammaHypo isEM; Cut", - # xbins=3, xmin=0.5, xmax=3.5, labels=labelsDescription)] - self.Histograms += [ defineHistogram('Ph_ClusterEt', type='TH1F', title="EFPhoton Hypo Cluster E_{T}; E_{T}^{em} [MeV]", xbins=50, xmin=-2000, xmax=100000) ] @@ -318,25 +306,25 @@ class TrigEFPhotonHypoCosmicMonitoring(TrigGenericMonitoringToolConfig): self.Histograms += [ defineHistogram('Ph_Phi', type='TH1F', title="EFPhoton Hypo Phi; #eta ",xbins=160, xmin=-3.2, xmax=3.2) ] self.Histograms += [ defineHistogram('Ph_ClusterEt37', type='TH1F', title="EFPhoton Hypo Cluster(3x7) E_{T}; E_{T}^{em} [MeV]", - xbins=50, xmin=-2000, xmax=100000) ] + xbins=50, xmin=-2000, xmax=100000) ] self.Histograms += [ defineHistogram('Ph_EnergyBE0', type='TH1F', title="EFPhoton Hypo Cluster E0; E_{em} [MeV]", - xbins=50, xmin=-2000, xmax=100000) ] + xbins=50, xmin=-2000, xmax=100000) ] self.Histograms += [ defineHistogram('Ph_EnergyBE1', type='TH1F', title="EFPhoton Hypo Cluster E1; E_{em} [MeV]", - xbins=50, xmin=-2000, xmax=100000) ] + xbins=50, xmin=-2000, xmax=100000) ] self.Histograms += [ defineHistogram('Ph_EnergyBE2', type='TH1F', title="EFPhoton Hypo Cluster E2; E_{em} [MeV]", - xbins=50, xmin=-2000, xmax=100000) ] + xbins=50, xmin=-2000, xmax=100000) ] self.Histograms += [ defineHistogram('Ph_EnergyBE3', type='TH1F', title="EFPhoton Hypo Cluster E3; E_{em} [MeV]", - xbins=50, xmin=-2000, xmax=100000) ] + xbins=50, xmin=-2000, xmax=100000) ] self.Histograms += [ defineHistogram('Ph_Eaccordion', type='TH1F', title="EFPhoton Hypo Cluster (E1+E2+E3); E_{T}^{em} [MeV]", - xbins=50, xmin=-2000, xmax=100000) ] + xbins=50, xmin=-2000, xmax=100000) ] self.Histograms += [ defineHistogram('Ph_E0Eaccordion', type='TH1F', title="EFPhton Hypo Cluster E0/(E1+E2+E3); E_{T}^{em} [MeV]", - xbins=50, xmin=-2000, xmax=100000) ] + xbins=50, xmin=-2000, xmax=100000) ] self.Histograms += [ defineHistogram('Ph_Eratio', type='TH1F', title="EFPhoton Hypo Eratio = (emax1 - emax2) / (emax1 + emax2) ; Eratio ", xbins=32, xmin=-0.1, xmax=1.5 ) ] diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2CaloHypoConfig.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2CaloHypoConfig.py index 5030ceae351055965de71845fbe618d7dbc1a2e7..db384f04f5d6af62ee181541e901ba44ae6afef5 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2CaloHypoConfig.py +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2CaloHypoConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration ############################## # L2 Electron and Photon Calorimeter Hypothesis Algorithm Configuration: @@ -86,7 +86,7 @@ class L2CaloHypo_EtCut (TrigL2CaloHypoBase): # AcceptAll flag: if true take events regardless of cuts self.AcceptAll = False - #L2 Threshold moved to 3 GeV within HLT threshold + #L2 Threshold moved to 3 GeV within HLT threshold self.ETthr = [(float(threshold) - 3)*GeV]*9 # No other cuts applied self.dETACLUSTERthr = 9999. diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2PhotonHypoMonitoring.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2PhotonHypoMonitoring.py index 585b0353d20d97fd7c648969298edcda5c6560a6..582f326d7b3cfc9ef5256a3c7ce8413779ce192e 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2PhotonHypoMonitoring.py +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2PhotonHypoMonitoring.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig @@ -9,15 +9,15 @@ class TrigL2PhotonHypoValidationMonitoring(TrigGenericMonitoringToolConfig): self.Histograms = [ defineHistogram('PhEt', type='TH1F', title="L2Photon Hypo E_{T}; E_{T}^{EM} [MeV]", - xbins=50, xmin=-2000, xmax=100000) ] + xbins=50, xmin=-2000, xmax=100000) ] self.Histograms += [ defineHistogram('PhEta', type='TH1F', title="L2Photon Hypo #eta;#eta", - xbins=100, xmin=-2.5, xmax=2.5) ] + xbins=100, xmin=-2.5, xmax=2.5) ] self.Histograms += [ defineHistogram('PhPhi', type='TH1F', title="L2Photon Hypo #phi;#phi", - xbins=128, xmin=-3.2, xmax=3.2) ] + xbins=128, xmin=-3.2, xmax=3.2) ] self.Histograms += [ defineHistogram('PhEratio', type='TH1F', title="L2Photon Hypo Eratio;Eratio", - xbins=64, xmin=-0.1, xmax=1.5) ] + xbins=64, xmin=-0.1, xmax=1.5) ] self.Histograms += [ defineHistogram('PhRcore', type='TH1F', title="L2Photon Hypo Rcore; Rcore", - xbins=48, xmin=-0.1, xmax=1.1 ) ] + xbins=48, xmin=-0.1, xmax=1.1 ) ] self.Histograms += [ defineHistogram('dEta', type='TH1F', title="L2Photon Hypo #Delta #eta; #Delta #eta", xbins=80, xmin=-0.2, xmax=0.2 ) ] @@ -51,11 +51,11 @@ class TrigL2PhotonHypoOnlineMonitoring(TrigGenericMonitoringToolConfig): self.Histograms = [ defineHistogram('PhEt', type='TH1F', title="L2Photon Hypo E_{T}; E_{T}^{EM} [MeV]", - xbins=50, xmin=-2000, xmax=100000) ] + xbins=50, xmin=-2000, xmax=100000) ] self.Histograms += [ defineHistogram('PhEta', type='TH1F', title="L2Photon Hypo #eta;#eta", - xbins=100, xmin=-2.5, xmax=2.5) ] + xbins=100, xmin=-2.5, xmax=2.5) ] self.Histograms += [ defineHistogram('PhPhi', type='TH1F', title="L2Photon Hypo #phi;#phi", - xbins=128, xmin=-3.2, xmax=3.2) ] + xbins=128, xmin=-3.2, xmax=3.2) ] cuts=['Input','has TrigPhotonContainer', '#Delta #eta', '#Delta #phi', '#eta','Reta','eRatio','E_{T}^{EM}', 'E_{T}^{Had}','f_{1}'] labelsDescription = '' @@ -74,15 +74,15 @@ class TrigL2PhotonHypoCosmicMonitoring(TrigGenericMonitoringToolConfig): self.defineTarget("Cosmic") self.Histograms = [ defineHistogram('PhEt', type='TH1F', title="L2Photon Hypo E_{T}; E_{T}^{EM} [MeV]", - xbins=50, xmin=-2000, xmax=100000) ] + xbins=50, xmin=-2000, xmax=100000) ] self.Histograms += [ defineHistogram('PhEta', type='TH1F', title="L2Photon Hypo #eta;#eta", - xbins=100, xmin=-2.5, xmax=2.5) ] + xbins=100, xmin=-2.5, xmax=2.5) ] self.Histograms += [ defineHistogram('PhPhi', type='TH1F', title="L2Photon Hypo #phi;#phi", - xbins=128, xmin=-3.2, xmax=3.2) ] + xbins=128, xmin=-3.2, xmax=3.2) ] self.Histograms += [ defineHistogram('PhEratio', type='TH1F', title="L2Photon Hypo Eratio;Eratio", - xbins=64, xmin=-0.1, xmax=1.5) ] + xbins=64, xmin=-0.1, xmax=1.5) ] self.Histograms += [ defineHistogram('PhRcore', type='TH1F', title="L2Photon Hypo Rcore; Rcore", - xbins=48, xmin=-0.1, xmax=1.1 ) ] + xbins=48, xmin=-0.1, xmax=1.1 ) ] self.Histograms += [ defineHistogram('dEta', type='TH1F', title="L2Photon Hypo #Delta #eta; #Delta #eta", xbins=80, xmin=-0.2, xmax=0.2 ) ] diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFDielectronMassFex.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFDielectronMassFex.cxx index 96433bc83174b7eefbaa50ce525e5a2945ae8e23..6e2c4c27d612f4f0f9118fb862d1e3468b637d10 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFDielectronMassFex.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFDielectronMassFex.cxx @@ -1,7 +1,7 @@ // -*- C++ -*- /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /************************************************************************** @@ -38,7 +38,6 @@ #include "xAODTrigger/TrigComposite.h" #include "xAODTrigger/TrigCompositeContainer.h" #include "TLorentzVector.h" -#include "CLHEP/Vector/LorentzVector.h" //#include "TrigConfHLTData/HLTTriggerElement.h" #include <math.h> diff --git a/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/CMakeLists.txt index 8750c01f1f8533e38b598298e9b925c7c4914a52..cf94b2815d90c3d38658bece3666fd73e0d340a1 100644 --- a/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/CMakeLists.txt +++ b/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/CMakeLists.txt @@ -1,43 +1,13 @@ -################################################################################ -# Package: TrigEgammaMuonCombHypo -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigEgammaMuonCombHypo ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/StoreGate - DetectorDescription/GeoPrimitives - GaudiKernel - Reconstruction/egamma/egammaEvent - Trigger/TrigEvent/TrigCaloEvent - Trigger/TrigEvent/TrigInDetEvent - Trigger/TrigEvent/TrigMuonEvent - Trigger/TrigEvent/TrigParticle - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigEvent/TrigTopoEvent - Trigger/TrigSteer/TrigInterfaces - PRIVATE - Control/CxxUtils - Event/xAOD/xAODEgamma - Event/xAOD/xAODMuon - Reconstruction/MuonIdentification/MuidEvent - Reconstruction/RecoTools/ITrackToVertex - Tracking/TrkEvent/VxVertex ) - -# External dependencies: -find_package( Eigen ) -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) - # Component(s) in the package: atlas_add_component( TrigEgammaMuonCombHypo src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} StoreGateLib SGtests GeoPrimitives GaudiKernel egammaEvent TrigCaloEvent TrigInDetEvent TrigMuonEvent TrigParticle TrigSteeringEvent TrigTopoEvent TrigInterfacesLib CxxUtils xAODEgamma xAODMuon MuidEvent ITrackToVertex VxVertex ) + LINK_LIBRARIES CxxUtils GaudiKernel GeoPrimitives ITrackToVertex MuidEvent StoreGateLib TrigInDetEvent TrigInterfacesLib TrigMuonEvent TrigParticle TrigSteeringEvent TrigTopoEvent VxVertex egammaEvent xAODEgamma xAODMuon ) # Install files from the package: -atlas_install_headers( TrigEgammaMuonCombHypo ) -atlas_install_python_modules( python/*.py ) - +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) diff --git a/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigEFElectronMuonAngleHypoConfig.py b/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigEFElectronMuonAngleHypoConfig.py index 0b9b9fb56b1f8893e1f64f65ad0355b59c045e47..084428f892bfe1dc571a6c57555de43377e379de 100755 --- a/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigEFElectronMuonAngleHypoConfig.py +++ b/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigEFElectronMuonAngleHypoConfig.py @@ -1,8 +1,8 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from TrigEgammaMuonCombHypo.TrigEgammaMuonCombHypoConf import TrigEFElectronMuonAngleFexAlgo, TrigEFElectronMuonAngleHypo from AthenaCommon.SystemOfUnits import GeV -from TrigEgammaMuonCombHypo.TrigEFElectronMuonAngleHypoMonitoring import * +import TrigEgammaMuonCombHypo.TrigEFElectronMuonAngleHypoMonitoring as mon class TrigEFElectronMuonAngleFex ( TrigEFElectronMuonAngleFexAlgo ): __slots__ = [] @@ -19,7 +19,7 @@ class TrigEFElectronMuonAngleFex ( TrigEFElectronMuonAngleFexAlgo ): self.MaxDRCut=99.0 self.MaxDPhiCut=99.0 - self.AthenaMonTools = [ TrigEFElectronMuonAngleOnlineFexMonitoring(), TrigEFElectronMuonAngleValidationFexMonitoring_emutopo() ] + self.AthenaMonTools = [ mon.TrigEFElectronMuonAngleOnlineFexMonitoring(), mon.TrigEFElectronMuonAngleValidationFexMonitoring_emutopo() ] # new cuts as presented at TGM on April 20 class TrigEFElectronMuonAngleHypo_tight ( TrigEFElectronMuonAngleHypo ): @@ -40,7 +40,7 @@ class TrigEFElectronMuonAngleHypo_tight ( TrigEFElectronMuonAngleHypo ): self.MaxDPhiCut=1.5 - self.AthenaMonTools = [ TrigEFElectronMuonAngleOnlineHypoMonitoring(), TrigEFElectronMuonAngleValidationHypoMonitoring_emutopo() ] + self.AthenaMonTools = [ mon.TrigEFElectronMuonAngleOnlineHypoMonitoring(), mon.TrigEFElectronMuonAngleValidationHypoMonitoring_emutopo() ] class TrigEFElectronMuonAngleHypo_medium ( TrigEFElectronMuonAngleHypo ): __slots__ = [] @@ -60,7 +60,7 @@ class TrigEFElectronMuonAngleHypo_medium ( TrigEFElectronMuonAngleHypo ): self.MaxDPhiCut=1.5 - self.AthenaMonTools = [ TrigEFElectronMuonAngleOnlineHypoMonitoring(), TrigEFElectronMuonAngleValidationHypoMonitoring_emutopo() ] + self.AthenaMonTools = [ mon.TrigEFElectronMuonAngleOnlineHypoMonitoring(), mon.TrigEFElectronMuonAngleValidationHypoMonitoring_emutopo() ] class TrigEFElectronMuonAngleHypo_loose ( TrigEFElectronMuonAngleHypo ): __slots__ = [] @@ -80,7 +80,7 @@ class TrigEFElectronMuonAngleHypo_loose ( TrigEFElectronMuonAngleHypo ): self.MaxDPhiCut=1.5 - self.AthenaMonTools = [ TrigEFElectronMuonAngleOnlineHypoMonitoring(), TrigEFElectronMuonAngleValidationHypoMonitoring_emutopo() ] + self.AthenaMonTools = [ mon.TrigEFElectronMuonAngleOnlineHypoMonitoring(), mon.TrigEFElectronMuonAngleValidationHypoMonitoring_emutopo() ] #algorithms configured in TriggerMenuPython - to prevent athena crash in the transition period @@ -102,7 +102,7 @@ class TrigEFElectronMuonAngleHypo_e5mu4 ( TrigEFElectronMuonAngleHypo ): self.MaxDPhiCut=1.5 - self.AthenaMonTools = [ TrigEFElectronMuonAngleOnlineHypoMonitoring(), TrigEFElectronMuonAngleValidationHypoMonitoring_emutopo() ] + self.AthenaMonTools = [ mon.TrigEFElectronMuonAngleOnlineHypoMonitoring(), mon.TrigEFElectronMuonAngleValidationHypoMonitoring_emutopo() ] class TrigEFElectronMuonAngleHypo_e5mu4_medium ( TrigEFElectronMuonAngleHypo ): __slots__ = [] @@ -122,7 +122,7 @@ class TrigEFElectronMuonAngleHypo_e5mu4_medium ( TrigEFElectronMuonAngleHypo ): self.MaxDPhiCut=1.5 - self.AthenaMonTools = [ TrigEFElectronMuonAngleOnlineHypoMonitoring(), TrigEFElectronMuonAngleValidationHypoMonitoring_emutopo() ] + self.AthenaMonTools = [ mon.TrigEFElectronMuonAngleOnlineHypoMonitoring(), mon.TrigEFElectronMuonAngleValidationHypoMonitoring_emutopo() ] class TrigEFElectronMuonAngleHypo_bXemu ( TrigEFElectronMuonAngleHypo ): __slots__ = [] @@ -142,4 +142,4 @@ class TrigEFElectronMuonAngleHypo_bXemu ( TrigEFElectronMuonAngleHypo ): self.MinDRCut=0. self.MaxDPhiCut=1.5 - self.AthenaMonTools = [ TrigEFElectronMuonAngleOnlineHypoMonitoring(), TrigEFElectronMuonAngleValidationHypoMonitoring_emutopo() ] + self.AthenaMonTools = [ mon.TrigEFElectronMuonAngleOnlineHypoMonitoring(), mon.TrigEFElectronMuonAngleValidationHypoMonitoring_emutopo() ] diff --git a/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigEFElectronMuonAngleHypoMonitoring.py b/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigEFElectronMuonAngleHypoMonitoring.py index 14e691f357f0877b2b44203e356dff21dff6489e..0b706060d76ed9ce82eacf7964f654144607152c 100644 --- a/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigEFElectronMuonAngleHypoMonitoring.py +++ b/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigEFElectronMuonAngleHypoMonitoring.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig from AthenaCommon.SystemOfUnits import GeV @@ -7,7 +7,7 @@ cuts=['Input','Has EmuTopoInfo','Opposite Charge','Common Vertex','dPhi','dR','m labelsDescription = '' for c in cuts: - labelsDescription += c+':' + labelsDescription += c+':' class TrigEFElectronMuonAngleOnlineFexMonitoring(TrigGenericMonitoringToolConfig): diff --git a/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigEFPhotonMuonAngleHypoConfig.py b/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigEFPhotonMuonAngleHypoConfig.py index 5dc1f99eb662d3684bf87e9536e107d1342aa5a3..19fcd87596180cbbe1f0ecba91f32ae83ce094bc 100755 --- a/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigEFPhotonMuonAngleHypoConfig.py +++ b/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigEFPhotonMuonAngleHypoConfig.py @@ -1,15 +1,15 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from TrigEgammaMuonCombHypo.TrigEgammaMuonCombHypoConf import TrigEFPhotonMuonAngleFexAlgo, TrigEFElectronMuonAngleHypo from AthenaCommon.SystemOfUnits import GeV -from TrigEgammaMuonCombHypo.TrigEFElectronMuonAngleHypoMonitoring import * +import TrigEgammaMuonCombHypo.TrigEFElectronMuonAngleHypoMonitoring as mon class TrigEFPhotonMuonAngleFex ( TrigEFPhotonMuonAngleFexAlgo ): __slots__ = [] def __init__(self, name="TrigEFPhotonMuonAngleFex"): super(TrigEFPhotonMuonAngleFex, self).__init__(name) - self.AthenaMonTools = [ TrigEFPhotonMuonAngleOnlineMonitoring() ] + self.AthenaMonTools = [ mon.TrigEFPhotonMuonAngleOnlineMonitoring() ] class TrigEFPhotonMuonAngleHypo_tau ( TrigEFElectronMuonAngleHypo ): @@ -30,4 +30,4 @@ class TrigEFPhotonMuonAngleHypo_tau ( TrigEFElectronMuonAngleHypo ): self.MinDRCut=0. self.MaxDPhiCut=1.5 - self.AthenaMonTools = [ TrigEFElectronMuonAngleOnlineHypoMonitoring(), TrigEFElectronMuonAngleValidationHypoMonitoring_emutopo() ] + self.AthenaMonTools = [ mon.TrigEFElectronMuonAngleOnlineHypoMonitoring(), mon.TrigEFElectronMuonAngleValidationHypoMonitoring_emutopo() ] diff --git a/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigL2ElectronMuonAngleHypoConfig.py b/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigL2ElectronMuonAngleHypoConfig.py index 95c662ad7fe204c356ead9730fa3b99d34794f29..3eab34f8069e2f16415f03403037c6144c191795 100755 --- a/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigL2ElectronMuonAngleHypoConfig.py +++ b/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigL2ElectronMuonAngleHypoConfig.py @@ -1,8 +1,8 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from TrigEgammaMuonCombHypo.TrigEgammaMuonCombHypoConf import TrigL2ElectronMuonAngleFexAlgo, TrigL2ElectronMuonAngleHypo from AthenaCommon.SystemOfUnits import GeV -from TrigEgammaMuonCombHypo.TrigL2ElectronMuonAngleHypoMonitoring import * +import TrigEgammaMuonCombHypo.TrigL2ElectronMuonAngleHypoMonitoring as mon class TrigL2ElectronMuonAngleFex ( TrigL2ElectronMuonAngleFexAlgo ): __slots__ = [] @@ -20,7 +20,7 @@ class TrigL2ElectronMuonAngleFex ( TrigL2ElectronMuonAngleFexAlgo ): self.LowerMassCut=0.0*GeV self.UpperMassCut=999.0*GeV - self.AthenaMonTools = [ TrigL2ElectronMuonAngleOnlineMonitoring(), TrigL2ElectronMuonAngleValidationMonitoring_emutopo() ] + self.AthenaMonTools = [ mon.TrigL2ElectronMuonAngleOnlineMonitoring(), mon.TrigL2ElectronMuonAngleValidationMonitoring_emutopo() ] # new cuts as presented at TGM on April 20 class TrigL2ElectronMuonAngleHypo_tight (TrigL2ElectronMuonAngleHypo ): # tight selection @@ -46,7 +46,7 @@ class TrigL2ElectronMuonAngleHypo_tight (TrigL2ElectronMuonAngleHypo ): # tight self.LowerMassCut=1.5*GeV self.UpperMassCut=10.0*GeV - self.AthenaMonTools = [ TrigL2ElectronMuonAngleOnlineMonitoring(), TrigL2ElectronMuonAngleValidationMonitoring_emutopo() ] + self.AthenaMonTools = [ mon.TrigL2ElectronMuonAngleOnlineMonitoring(), mon.TrigL2ElectronMuonAngleValidationMonitoring_emutopo() ] class TrigL2ElectronMuonAngleHypo_medium (TrigL2ElectronMuonAngleHypo ): # medium selection __slots__ = [] @@ -71,7 +71,7 @@ class TrigL2ElectronMuonAngleHypo_medium (TrigL2ElectronMuonAngleHypo ): # medi self.LowerMassCut=1.5*GeV self.UpperMassCut=10.0*GeV - self.AthenaMonTools = [ TrigL2ElectronMuonAngleOnlineMonitoring(), TrigL2ElectronMuonAngleValidationMonitoring_emutopo() ] + self.AthenaMonTools = [ mon.TrigL2ElectronMuonAngleOnlineMonitoring(), mon.TrigL2ElectronMuonAngleValidationMonitoring_emutopo() ] class TrigL2ElectronMuonAngleHypo_loose (TrigL2ElectronMuonAngleHypo ): # loose selection __slots__ = [] @@ -96,7 +96,7 @@ class TrigL2ElectronMuonAngleHypo_loose (TrigL2ElectronMuonAngleHypo ): # loose self.LowerMassCut=1.0*GeV self.UpperMassCut=20.0*GeV - self.AthenaMonTools = [ TrigL2ElectronMuonAngleOnlineMonitoring(), TrigL2ElectronMuonAngleValidationMonitoring_emutopo() ] + self.AthenaMonTools = [ mon.TrigL2ElectronMuonAngleOnlineMonitoring(), mon.TrigL2ElectronMuonAngleValidationMonitoring_emutopo() ] #algorithms configured in TriggerMenuPython - to prevent athena crash in the transition period @@ -124,7 +124,7 @@ class TrigL2ElectronMuonAngleHypo_e5mu4 (TrigL2ElectronMuonAngleHypo ): # tight self.LowerMassCut=1.5*GeV self.UpperMassCut=10.0*GeV - self.AthenaMonTools = [ TrigL2ElectronMuonAngleOnlineMonitoring(), TrigL2ElectronMuonAngleValidationMonitoring_emutopo() ] + self.AthenaMonTools = [ mon.TrigL2ElectronMuonAngleOnlineMonitoring(), mon.TrigL2ElectronMuonAngleValidationMonitoring_emutopo() ] class TrigL2ElectronMuonAngleHypo_e5mu4_medium (TrigL2ElectronMuonAngleHypo ): # medium selection __slots__ = [] @@ -149,5 +149,4 @@ class TrigL2ElectronMuonAngleHypo_e5mu4_medium (TrigL2ElectronMuonAngleHypo ): self.LowerMassCut=1.5*GeV self.UpperMassCut=10.0*GeV - self.AthenaMonTools = [ TrigL2ElectronMuonAngleOnlineMonitoring(), TrigL2ElectronMuonAngleValidationMonitoring_emutopo() ] - + self.AthenaMonTools = [ mon.TrigL2ElectronMuonAngleOnlineMonitoring(), mon.TrigL2ElectronMuonAngleValidationMonitoring_emutopo() ] diff --git a/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigL2ElectronMuonAngleHypoMonitoring.py b/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigL2ElectronMuonAngleHypoMonitoring.py index 8a41e7377841eec65127ca2597296facc9807355..9f94694cc3e27356226e42c782462fb635fb782b 100644 --- a/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigL2ElectronMuonAngleHypoMonitoring.py +++ b/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigL2ElectronMuonAngleHypoMonitoring.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig from AthenaCommon.SystemOfUnits import GeV @@ -7,8 +7,7 @@ cuts=['Input','Has EmuTopoInfo','Opposite Charge','Common Vertex','dPhi','dR','m labelsDescription = '' for c in cuts: - labelsDescription += c+':' - + labelsDescription += c+':' class TrigL2ElectronMuonAngleOnlineMonitoring(TrigGenericMonitoringToolConfig): diff --git a/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigL2PhotonMuonAngleHypoConfig.py b/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigL2PhotonMuonAngleHypoConfig.py index 286877dbd0fc489994dded9c5ced0def45232fc0..3a2117c08129a10048c9150d137c421262d79201 100755 --- a/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigL2PhotonMuonAngleHypoConfig.py +++ b/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/python/TrigL2PhotonMuonAngleHypoConfig.py @@ -1,15 +1,15 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from TrigEgammaMuonCombHypo.TrigEgammaMuonCombHypoConf import TrigL2PhotonMuonAngleFexAlgo, TrigL2ElectronMuonAngleHypo from AthenaCommon.SystemOfUnits import GeV -from TrigEgammaMuonCombHypo.TrigL2ElectronMuonAngleHypoMonitoring import * +import TrigEgammaMuonCombHypo.TrigL2ElectronMuonAngleHypoMonitoring as mon class TrigL2PhotonMuonAngleFex ( TrigL2PhotonMuonAngleFexAlgo ): __slots__ = [] def __init__(self, name="TrigL2PhotonMuonAngleFex"): super(TrigL2PhotonMuonAngleFex, self).__init__(name) - self.AthenaMonTools = [ TrigL2PhotonMuonAngleOnlineMonitoring(), TrigL2PhotonMuonAngleValidationMonitoring() ] + self.AthenaMonTools = [ mon.TrigL2PhotonMuonAngleOnlineMonitoring(), mon.TrigL2PhotonMuonAngleValidationMonitoring() ] # new cuts as presented at TGM on April 20 class TrigL2PhotonMuonAngleHypo_tau (TrigL2ElectronMuonAngleHypo ): # tight selection @@ -34,4 +34,4 @@ class TrigL2PhotonMuonAngleHypo_tau (TrigL2ElectronMuonAngleHypo ): # tight sel self.LowerMassCut=0.*GeV self.UpperMassCut=6.0*GeV - self.AthenaMonTools = [ TrigL2ElectronMuonAngleOnlineMonitoring(),TrigL2ElectronMuonAngleValidationMonitoring_emutopo() ] + self.AthenaMonTools = [ mon.TrigL2ElectronMuonAngleOnlineMonitoring(), mon.TrigL2ElectronMuonAngleValidationMonitoring_emutopo() ] diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/CMakeLists.txt b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/CMakeLists.txt index 2b5aa6891ebb636e119087db68e558869275f9bd..b04652d5be4fbc4753af892140a9c4790a2f7751 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/CMakeLists.txt +++ b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/CMakeLists.txt @@ -1,16 +1,8 @@ -# $Id: CMakeLists.txt 727053 2016-03-01 14:24:32Z krasznaa $ -################################################################################ -# Package: TrigHLTJetHypoUnitTests -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigHLTJetHypoUnitTests ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( - PRIVATE - Trigger/TrigHypothesis/TrigHLTJetHypo ) - # External dependencies: find_package( ROOT COMPONENTS Core Physics ) find_package( GMock ) @@ -18,18 +10,14 @@ find_package( GMock ) atlas_add_library( TrigHLTJetHypoUnitTestsLib src/*.cxx exerciser/*.cxx - PUBLIC_HEADERS TrigHLTJetHypoUnitTests - # PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES xAODJet GaudiKernel TrigParticle TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib DecisionHandlingLib TrigHLTJetHypoLib - # PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ) - ) + NO_PUBLIC_HEADERS + LINK_LIBRARIES TrigHLTJetHypoLib + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel xAODJet ) atlas_add_component( TrigHLTJetHypoUnitTests exerciser/components/*.cxx - LINK_LIBRARIES TrigHLTJetHypoUnitTestsLib) + LINK_LIBRARIES TrigHLTJetHypoUnitTestsLib) -atlas_install_headers( TrigHLTJetHypoUnitTests ) - # Test(s) in the package: atlas_add_test( TrigHLTJetHypoTimerTest SOURCES src/Timer.cxx @@ -55,9 +43,7 @@ atlas_add_test( TrigHLTJetHypoUnitTests tests/xAODJetCollectorTest.cxx tests/PartitionsGrouperTest.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${GMOCK_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} GoogleTestTools ${GMOCK_LIBRARIES} - TrigHLTJetHypoLib - TrigHLTJetHypoUnitTestsLib) + LINK_LIBRARIES ${ROOT_LIBRARIES} GoogleTestTools ${GMOCK_LIBRARIES} TrigHLTJetHypoLib TrigHLTJetHypoUnitTestsLib ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/python/plot_av_times.py b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/python/plot_av_times.py index 4c68e7deb34f2ff9feb6cd35ee6c52ddb9909983..510cba5afd720f1e0a12ccc0a36bee71087f7003 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/python/plot_av_times.py +++ b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/python/plot_av_times.py @@ -1,8 +1,8 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from __future__ import print_function from plot_times import times import pylab as pl import sys -import os import glob if len(sys.argv) < 3: diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/python/plot_times.py b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/python/plot_times.py index 7acac9d6a44b573b98dac5144a5dc947ad8fd158..40b30a3f3d68c9c5204e8ee181bfcf9bebeae0b9 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/python/plot_times.py +++ b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/python/plot_times.py @@ -1,3 +1,4 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from __future__ import print_function import pylab as pl import sys diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/python/plot_tot_times.py b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/python/plot_tot_times.py index ef4c961c30233268245ac597c68e3d2fcffb941d..76e06c76943f1001f6548597eb4cf88155dbef98 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/python/plot_tot_times.py +++ b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/python/plot_tot_times.py @@ -1,8 +1,8 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from __future__ import print_function from plot_times import times import pylab as pl import sys -import os import glob from collections import defaultdict import itertools diff --git a/Trigger/TrigHypothesis/TrigHypoCommonTools/CMakeLists.txt b/Trigger/TrigHypothesis/TrigHypoCommonTools/CMakeLists.txt deleted file mode 100644 index 129fc53689eae0e96aba1e78d17718892720f8c7..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigHypoCommonTools/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ -################################################################################ -# Package: TrigHypoCommonTools -################################################################################ - -# Declare the package name: -atlas_subdir( TrigHypoCommonTools ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Event/ByteStreamCnvSvcBase - Trigger/TrigConfiguration/TrigConfInterfaces - Trigger/TrigEvent/TrigInDetEvent - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigSteer/TrigInterfaces - Trigger/TrigSteer/TrigSteering - PRIVATE - DetectorDescription/RegionSelector - Event/EventInfo - GaudiKernel - Tools/PathResolver - Trigger/TrigT1/TrigT1Result ) - -# External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) - -# Component(s) in the package: -atlas_add_component( TrigHypoCommonTools - src/*.cxx - src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ByteStreamCnvSvcBaseLib TrigInDetEvent TrigSteeringEvent TrigInterfacesLib TrigSteeringLib RegionSelectorLib EventInfo GaudiKernel PathResolver TrigT1Result ) - -# Install files from the package: -atlas_install_headers( TrigHypoCommonTools ) - diff --git a/Trigger/TrigHypothesis/TrigHypoCommonTools/TrigHypoCommonTools/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigHypoCommonTools/TrigHypoCommonTools/ATLAS_CHECK_THREAD_SAFETY deleted file mode 100644 index 91498c164bb17d27bef519d2f1aec25eb262001f..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigHypoCommonTools/TrigHypoCommonTools/ATLAS_CHECK_THREAD_SAFETY +++ /dev/null @@ -1 +0,0 @@ -Trigger/TrigHypothesis/TrigHypoCommonTools diff --git a/Trigger/TrigHypothesis/TrigHypoCommonTools/TrigHypoCommonTools/L1InfoHypo.hxx b/Trigger/TrigHypothesis/TrigHypoCommonTools/TrigHypoCommonTools/L1InfoHypo.hxx deleted file mode 100755 index 9936bbd30c89d972704403aec1332eef56da5366..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigHypoCommonTools/TrigHypoCommonTools/L1InfoHypo.hxx +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef TRIGHYPOCOMMONTOOLS_L1INFOHYPO_HXX -#define TRIGHYPOCOMMONTOOLS_L1INFOHYPO_HXX -/* - L1InfoHypo -*/ -#include <string> -#include <vector> -#include <set> -#include "GaudiKernel/Algorithm.h" -#include "GaudiKernel/ToolHandle.h" -#include "GaudiKernel/ServiceHandle.h" - -#include "TrigInterfaces/HypoAlgo.h" -#include "TrigInterfaces/IMonitoredAlgo.h" - -#include "ByteStreamCnvSvcBase/ROBDataProviderSvc.h" - -#include "TrigSteeringEvent/Enums.h" -#include "TrigSteering/LvlConverter.h" -#include "TrigConfInterfaces/ILVL1ConfigSvc.h" - -namespace HLT -{ - class ILvl1ResultAccessTool; - class Chain; -} - -class L1InfoHypo : public HLT::HypoAlgo { -public: - L1InfoHypo(const std::string& name, ISvcLocator* svc); - ~L1InfoHypo(); - - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltExecute(const HLT::TriggerElement* outputTE,bool &Pass); - HLT::ErrorCode hltFinalize(); - - -protected: - // Flow of the algorithm - -protected: - - // JobOption properties - - bool m_alwaysPass; - bool m_invertSelection; - bool m_invertBitMaskSelection; - bool m_invertL1ItemNameSelection; - bool m_useBeforePrescaleBit; - std::vector<std::string> m_L1ItemNames; - - unsigned int m_triggerTypeBitMask; - unsigned int m_L1TriggerBitMask; - - unsigned int m_triggerTypeBit; - unsigned int m_L1TriggerBit; - - // Output object - - // Internal data structures used by this algorithm - - // Monitored Quantities - - -private: - ToolHandle<HLT::ILvl1ResultAccessTool> m_lvl1Tool; -}; - -#endif // TRIGHYPOCOMMONTOOLS_L1INFOHYPO_HXX diff --git a/Trigger/TrigHypothesis/TrigHypoCommonTools/src/L1InfoHypo.cxx b/Trigger/TrigHypothesis/TrigHypoCommonTools/src/L1InfoHypo.cxx deleted file mode 100755 index b6f8e0fca95f1271a8d89c7338d081e4b3ff250e..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigHypoCommonTools/src/L1InfoHypo.cxx +++ /dev/null @@ -1,170 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -/* - L1InfoHypo.cxx -*/ -#include <cmath> -#include "TrigHypoCommonTools/L1InfoHypo.hxx" - -#include <EventInfo/EventID.h> -#include "EventInfo/TriggerInfo.h" -#include "EventInfo/EventInfo.h" - -#include "PathResolver/PathResolver.h" -#include "GaudiKernel/ITHistSvc.h" -#include "TrigSteeringEvent/TrigRoiDescriptor.h" -#include "TrigSteering/Lvl1ItemsAndRoIs.h" -#include "TrigT1Result/RoIBResult.h" -#include "TrigSteeringEvent/Lvl1Result.h" -#include "TrigSteering/Lvl1ResultAccessTool.h" - -using namespace std; - -L1InfoHypo::L1InfoHypo(const std::string& name, ISvcLocator* svc) - : HLT::HypoAlgo(name, svc), - m_lvl1Tool("HLT::Lvl1ResultAccessTool/Lvl1ResultAccessTool",this) -{ - declareProperty("AlwaysPass",m_alwaysPass=false); - declareProperty("InvertSelection",m_invertSelection=false); - - declareProperty("L1ItemNames",m_L1ItemNames); - declareProperty("InvertL1ItemNameSelection",m_invertL1ItemNameSelection=false); - declareProperty("UseBeforePrescaleBit", m_useBeforePrescaleBit=false); - - declareProperty("TriggerTypeBitMask" ,m_triggerTypeBitMask=0x80); - declareProperty("L1TriggerBitMask" ,m_L1TriggerBitMask=0); - - declareProperty("TriggerTypeBit" ,m_triggerTypeBit=0x80); - declareProperty("L1TriggerBit" ,m_L1TriggerBit=0); - declareProperty("InvertBitMaskSelection",m_invertBitMaskSelection=false); - - declareProperty("Lvl1ResultAccessToool",m_lvl1Tool,"tool to access lvl1 result"); -} - -L1InfoHypo::~L1InfoHypo() { -} - -HLT::ErrorCode L1InfoHypo::hltInitialize() -{ - msg() << MSG::DEBUG << "initialize()" << endmsg; - - msg() << MSG::INFO << "Parameters for L1InfoHypo:" << name() << endmsg; - msg() << MSG::INFO << "AlwaysPass : " << m_alwaysPass << endmsg; - msg() << MSG::INFO << "InvertSelection : " << m_invertSelection << endmsg; - msg() << MSG::INFO << "L1ItemNames : " << m_L1ItemNames << endmsg; - msg() << MSG::INFO << "InvertL1ItemNameSelection : " << m_invertL1ItemNameSelection << endmsg; - msg() << MSG::INFO << "TriggerTypeBitMask : " << m_triggerTypeBitMask << endmsg; - msg() << MSG::INFO << "L1TriggerBitMask : " << m_L1TriggerBitMask << endmsg; - msg() << MSG::INFO << "TriggerTypeBit : " << m_triggerTypeBit << endmsg; - msg() << MSG::INFO << "L1TriggerBit : " << m_L1TriggerBit << endmsg; - msg() << MSG::INFO << "InvertBitMasksSelection : " << m_invertBitMaskSelection << endmsg; - - - if ( m_lvl1Tool.retrieve().isFailure()) - { - msg() << MSG::FATAL << "Unable to retrieve lvl1 result access tool: " << m_lvl1Tool << endmsg; - return HLT::FATAL; - } - - StatusCode sc = m_lvl1Tool->updateConfig(true,true,true); - if ( sc.isFailure() ) - { - (msg()) << MSG::FATAL << "Unable to configure tool!" << endmsg; - return HLT::FATAL; - } - - msg() << MSG::DEBUG << "initialize success" << endmsg; - - return HLT::OK; -} - -HLT::ErrorCode L1InfoHypo::hltFinalize() -{ - msg() << MSG::DEBUG << "finalize()" << endmsg; - - return HLT::OK; -} - -HLT::ErrorCode L1InfoHypo::hltExecute(const HLT::TriggerElement* /*unused*/,bool &Pass) -{ - - Pass=true; - bool ItemPass=false; - - int output_level = msgSvc()->outputLevel(name()); - if (output_level <= MSG::VERBOSE) msg() << MSG::VERBOSE << "execL1InfoHypo" << endmsg; - const EventInfo* constEventInfo(0); - - if (m_alwaysPass) {Pass=true; return HLT::OK; }; - - StatusCode sc = evtStore()->retrieve(constEventInfo); - - if(sc.isFailure()) - { - if(output_level <= MSG::FATAL) - msg() << MSG::FATAL << "Can't get EventInfo object" << endmsg; - return HLT::BAD_JOB_SETUP; - } - else - { - if (m_L1ItemNames.size()) - { - const ROIB::RoIBResult* result; - sc = evtStore()->retrieve(result); - - if(sc.isFailure()) - { - msg() << MSG::WARNING - << "Unable to retrieve RoIBResult from storeGate!" - << endmsg; - return HLT::NO_LVL1_RESULT; - } - std::vector<const LVL1CTP::Lvl1Item*> items = m_lvl1Tool->createL1Items(*result); - for (std::vector<const LVL1CTP::Lvl1Item*>::const_iterator item = items.begin(); item != items.end(); ++item) - { - if(m_useBeforePrescaleBit) { - if(!(*item)->isPassedBeforePrescale()) - continue; - } - else { - if(!(*item)->isPassedAfterVeto()) - continue; - } - - msg() << MSG::DEBUG << "Found active LVL1 item " << (*item)->name() << " (" - << (*item)->hashId() << ")" << endmsg; - for (int unsigned i=0;i<m_L1ItemNames.size();i++) - { - msg() << MSG::DEBUG << "Comparing " << - (*item)->name() << " to [L1_]" << - m_L1ItemNames[i] << " result: " << - ( ((*item)->name()==m_L1ItemNames[i]) or ((*item)->name()=="L1_"+m_L1ItemNames[i]) ) << endmsg; - ItemPass=ItemPass or ((*item)->name()==m_L1ItemNames[i]) or ((*item)->name()=="L1_"+m_L1ItemNames[i]); - }; - } - - if (m_invertL1ItemNameSelection) ItemPass=(ItemPass)?0:1; - } - else - ItemPass=true; - - const TriggerInfo* tinfo = constEventInfo->trigger_info(); - TriggerInfo::number_type L1TriggerType=tinfo->level1TriggerType(); - TriggerInfo::number_type L1ID=tinfo->extendedLevel1ID(); - - //printf("L1 Info: %x %x\n",L1TriggerType,L1ID); - msg() << MSG::DEBUG << "L1 Info: " << hex << L1TriggerType << " " << L1ID << endmsg; - bool PassBM= - ((L1TriggerType & m_triggerTypeBitMask)==m_triggerTypeBit||(m_triggerTypeBitMask==0))&& - ((L1ID & m_L1TriggerBitMask )==m_L1TriggerBit ||(m_L1TriggerBitMask ==0)); - if (m_invertBitMaskSelection) PassBM=(PassBM)?0:1; - Pass = Pass and PassBM and ItemPass; - } - - if (m_invertSelection) Pass=(Pass)?0:1; - - return HLT::OK; -} - diff --git a/Trigger/TrigHypothesis/TrigHypoCommonTools/src/components/TrigHypoCommonTools_entries.cxx b/Trigger/TrigHypothesis/TrigHypoCommonTools/src/components/TrigHypoCommonTools_entries.cxx deleted file mode 100644 index 5f34d06c56a2e96b944fe537fbc2b35f5961c14f..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigHypoCommonTools/src/components/TrigHypoCommonTools_entries.cxx +++ /dev/null @@ -1,5 +0,0 @@ -#include "TrigHypoCommonTools/L1InfoHypo.hxx" - - -DECLARE_COMPONENT( L1InfoHypo ) - diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/CMakeLists.txt index 19b891eaa29baaaf296910b79a9535eada0fc2b9..7b1dcb881865a88e6ad34c8dd5de954e3b5545f6 100644 --- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/CMakeLists.txt +++ b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/CMakeLists.txt @@ -1,41 +1,17 @@ -################################################################################ -# Package: TrigLongLivedParticlesHypo -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigLongLivedParticlesHypo ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Trigger/TrigEvent/TrigCaloEvent - Trigger/TrigEvent/TrigInDetEvent - Trigger/TrigEvent/TrigMuonEvent - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigSteer/TrigInterfaces - Trigger/TrigTools/TrigTimeAlgs - PRIVATE - Calorimeter/CaloEvent - Control/CxxUtils - Event/xAOD/xAODJet - Event/xAOD/xAODTracking - Event/xAOD/xAODTrigger - GaudiKernel - Trigger/TrigEvent/TrigParticle ) - # External dependencies: -find_package( CLHEP ) find_package( tdaq-common COMPONENTS eformat ) -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint ) # Component(s) in the package: atlas_add_component( TrigLongLivedParticlesHypo src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} TrigCaloEvent TrigInDetEvent TrigMuonEvent TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib CaloEvent CxxUtils xAODJet xAODTracking xAODTrigger GaudiKernel TrigParticle InDetIdentifier InDetPrepRawData IRegionSelector TrkSpacePoint xAODEventInfo) + INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} + LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} CaloEvent CxxUtils GaudiKernel IRegionSelector InDetIdentifier InDetPrepRawData TrigCaloEvent TrigInDetEvent TrigInterfacesLib TrigParticle TrigSteeringEvent TrigTimeAlgsLib TrkSpacePoint xAODEventInfo xAODJet xAODTracking xAODTrigger ) # Install files from the package: -atlas_install_headers( TrigLongLivedParticlesHypo ) -atlas_install_python_modules( python/*.py ) -atlas_install_joboptions( share/*.py ) - +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/MuonClusterHypo.h b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/MuonClusterHypo.h old mode 100755 new mode 100644 diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/MuonClusterIsolationHypo.h b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/MuonClusterIsolationHypo.h old mode 100755 new mode 100644 diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/TrigCaloRatioHypo.h b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/TrigCaloRatioHypo.h old mode 100755 new mode 100644 diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/TrigL2HVJetHypo.h b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/TrigL2HVJetHypo.h old mode 100755 new mode 100644 diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/TrigL2HVJetHypoAllCuts.h b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/TrigL2HVJetHypoAllCuts.h old mode 100755 new mode 100644 diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/TrigL2HVJetHypoTrk.h b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/TrigL2HVJetHypoTrk.h old mode 100755 new mode 100644 diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/TrigLoFRemovalHypo.h b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/TrigLoFRemovalHypo.h old mode 100755 new mode 100644 diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/TrigNewLoFHypo.h b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/TrigNewLoFHypo.h old mode 100755 new mode 100644 diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/python/TrigLongLivedParticlesHypoConfig.py b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/python/TrigLongLivedParticlesHypoConfig.py index 6f45055af6dbc6f3414c57dc7d04df4ed9a9afcb..cd608cc9c1f8cc5856ac5e474ae0bc824a2bb9ad 100755 --- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/python/TrigLongLivedParticlesHypoConfig.py +++ b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/python/TrigLongLivedParticlesHypoConfig.py @@ -1,11 +1,7 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from TrigLongLivedParticlesHypo.TrigLongLivedParticlesHypoConf import * -from TrigLongLivedParticlesHypo.TrigLongLivedParticlesHypoMonitoring import * -from AthenaCommon.SystemOfUnits import MeV, GeV -from AthenaCommon.AppMgr import ToolSvc -from AthenaCommon.Logging import logging +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +import TrigLongLivedParticlesHypo.TrigLongLivedParticlesHypoConf as Conf +from AthenaCommon.SystemOfUnits import GeV def getCaloRatioHypoInstance( instance, threshold, logratio, dotrackiso): @@ -25,7 +21,7 @@ def getCaloRatioHypoInstance( instance, threshold, logratio, dotrackiso): name=name ) -class MuonClusterHypoConfig (MuonClusterHypo): +class MuonClusterHypoConfig (Conf.MuonClusterHypo): __slots__ = [] def __init__(self, name, maxEta, midEta): @@ -38,7 +34,7 @@ class MuonClusterHypoConfig (MuonClusterHypo): self.maxEta = maxEta self.midEta = midEta -class MuonClusterIsolationHypoConfig (MuonClusterIsolationHypo): +class MuonClusterIsolationHypoConfig (Conf.MuonClusterIsolationHypo): __slots__ = [] def __init__(self, name, maxEta, midEta, numJet, numTrk, doIsolation): super( MuonClusterIsolationHypoConfig, self ).__init__( name ) @@ -63,7 +59,7 @@ class MuonClusterIsolationHypoConfig (MuonClusterIsolationHypo): self.nTrk = numTrk self.doIsolation = doIsolation -class L2HVJetHypoAllCutsBase (TrigL2HVJetHypoAllCuts): +class L2HVJetHypoAllCutsBase (Conf.TrigL2HVJetHypoAllCuts): __slots__ = [] def __init__(self, name): super( L2HVJetHypoAllCutsBase, self ).__init__( name ) @@ -114,7 +110,7 @@ class L2HVJetHypoAllCuts_doCleaning (L2HVJetHypoAllCuts): self.jetTimeCellsThr = 25 -class L2HVJetHypoBase (TrigL2HVJetHypo): +class L2HVJetHypoBase (Conf.TrigL2HVJetHypo): __slots__ = [] def __init__(self, name): super( L2HVJetHypoBase, self ).__init__( name ) @@ -165,7 +161,7 @@ class L2HVJetHypo_doCleaning (L2HVJetHypo): self.jetTimeCellsThr = 25 -class L2HVJetHypoTrkBase (TrigL2HVJetHypoTrk): +class L2HVJetHypoTrkBase (Conf.TrigL2HVJetHypoTrk): __slots__ = [] def __init__(self, name): super( L2HVJetHypoTrkBase, self ).__init__( name ) @@ -187,7 +183,7 @@ class L2HVJetHypoTrk (L2HVJetHypoTrkBase): super( L2HVJetHypoTrk, self ).__init__( name ) -class TrigNewLoFHypoConfig (TrigNewLoFHypo): +class TrigNewLoFHypoConfig (Conf.TrigNewLoFHypo): __slots__ = [] def __init__(self, name = "TrigNewLoFHypoConfig"): super( TrigNewLoFHypoConfig, self ).__init__( name ) @@ -197,7 +193,7 @@ class TrigNewLoFHypoConfig (TrigNewLoFHypo): self.LoFCellContSize = 4 -class TrigLoFRemovalHypoConfig (TrigLoFRemovalHypo): +class TrigLoFRemovalHypoConfig (Conf.TrigLoFRemovalHypo): __slots__ = [] def __init__(self, name = "TrigLoFRemovalHypoConfig"): super( TrigLoFRemovalHypoConfig, self ).__init__( name ) @@ -217,7 +213,7 @@ class TrigLoFRemovalHypoConfig (TrigLoFRemovalHypo): self.LoFCellContSize = 4 -class CaloRatioHypo (TrigCaloRatioHypo): +class CaloRatioHypo (Conf.TrigCaloRatioHypo): __slots__ = [] def __init__(self, threshold, logratio, dotrackiso, name): super( CaloRatioHypo, self ).__init__( name ) diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/share/TriggerConfig_MuClusterHypo.py b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/share/TriggerConfig_MuClusterHypo.py deleted file mode 100755 index 4330c5fe324d8c167f2ecc60274783e8fe90887c..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/share/TriggerConfig_MuClusterHypo.py +++ /dev/null @@ -1,22 +0,0 @@ -include.block("TrigLongLivedParticlesHypo/TriggerConfig_MuClusterHypo.py") - -class TriggerConfig_MuClusterHypo: - - def __init__(self, level, type = None, threshold = None, isIsolated = None): - - if type == "muon": - self.__instname__ = "muCluster_Muon_" + level - self.__sequence__ = "MuClusterHypo/MuClusterHypo/Muon_" - if type == "900GeV": - self.__instname__ = "muCluster_900GeV_" + level - self.__sequence__ = "MuClusterHypo/MuClusterHypo/900GeV_" - - #self.__sequence__ += threshold - - def instanceName(self): - return self.__instname__ - - def classAndInstanceName(self): - return [ self.__sequence__ ] - -include ("TrigLongLivedParticlesHypo/jobOfragment_MuClusterHypo.py") diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/share/jobOfragment_MuonClusterHypo.py b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/share/jobOfragment_MuonClusterHypo.py deleted file mode 100755 index 8045aa074b07d27da283feff8997d20fa062e59f..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/share/jobOfragment_MuonClusterHypo.py +++ /dev/null @@ -1,5 +0,0 @@ -theApp.Dlls += [ "TrigLongLivedParticlesHypo" ] -# -# so far only one instance of the muon cluster hypothesis -# algo is needed -MuonClusterHypo = Algorithm( "MuonClusterHypo" ) diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/MuonClusterHypo.cxx b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/MuonClusterHypo.cxx old mode 100755 new mode 100644 index 99f147e320ffc19c8587a1f48bf19eeb61e80fdc..5323c57ac4b53e57613f9dd3949372db6cef7d69 --- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/MuonClusterHypo.cxx +++ b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/MuonClusterHypo.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // @@ -13,7 +13,6 @@ #include "xAODTrigger/TrigComposite.h" #include "xAODTrigger/TrigCompositeContainer.h" -#include "CLHEP/Units/SystemOfUnits.h" class ISvcLocator; diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/MuonClusterIsolationHypo.cxx b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/MuonClusterIsolationHypo.cxx old mode 100755 new mode 100644 index cff42da580fda48b3b1b01d5c94c5630beab4502..297dbc65ee20950f252e7f657422c125aab8729e --- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/MuonClusterIsolationHypo.cxx +++ b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/MuonClusterIsolationHypo.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // @@ -13,7 +13,6 @@ #include "xAODTrigger/TrigComposite.h" #include "xAODTrigger/TrigCompositeContainer.h" -#include "CLHEP/Units/SystemOfUnits.h" class ISvcLocator; diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigCaloRatioHypo.cxx b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigCaloRatioHypo.cxx old mode 100755 new mode 100644 index 77d70149342fd300bdf1e8e1fbc5dafb95e356de..0213c140b2d7c558433ce3b38848774339153987 --- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigCaloRatioHypo.cxx +++ b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigCaloRatioHypo.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // ************************************************************ @@ -23,7 +23,7 @@ #include "CxxUtils/fpcompare.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GaudiKernel/SystemOfUnits.h" //** ----------------------------------------------------------------------------------------------------------------- **// @@ -31,7 +31,7 @@ TrigCaloRatioHypo::TrigCaloRatioHypo(const std::string& name, ISvcLocator* pSvcLocator): HLT::HypoAlgo(name, pSvcLocator) { - declareProperty("EtCut", m_etCut = 30*CLHEP::GeV, "cut value forthe jet et"); + declareProperty("EtCut", m_etCut = 30*Gaudi::Units::GeV, "cut value forthe jet et"); declareProperty("LogRatioCut", m_logRatioCut = 1.2, "cut value for the jet energy ratio"); declareProperty("PtMinID", m_ptCut = 2000.0, "minimum track Pt in MeV for the isolation requirement"); declareProperty("TrackCut", m_trackCut = 0, "minimum number of tracks for the isolation requirement"); @@ -165,7 +165,7 @@ HLT::ErrorCode TrigCaloRatioHypo::hltExecute(const HLT::TriggerElement* outputTE if (jetEt > m_etCut && std::fabs(jetEta) <= m_etaCut) { - m_jetEt.push_back(jetEt/CLHEP::GeV); + m_jetEt.push_back(jetEt/Gaudi::Units::GeV); m_jetEta.push_back(jetEta); m_jetPhi.push_back(jetPhi); m_logRatio = jetRatio; @@ -177,7 +177,7 @@ HLT::ErrorCode TrigCaloRatioHypo::hltExecute(const HLT::TriggerElement* outputTE if (jetEt > m_etCut && std::fabs(jetEta) <= m_etaCut && jetRatio <= m_logRatioCut) { - m_jetEt.push_back(jetEt/CLHEP::GeV); + m_jetEt.push_back(jetEt/Gaudi::Units::GeV); m_jetEta.push_back(jetEta); m_jetPhi.push_back(jetPhi); m_logRatio = jetRatio; diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigL2HVJetHypo.cxx b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigL2HVJetHypo.cxx old mode 100755 new mode 100644 index f8459986f73023e8a5724fb02394ba4bed784405..9847c7505e15c589dc1e8931b234f74509d5d94e --- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigL2HVJetHypo.cxx +++ b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigL2HVJetHypo.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // ******************************************************************** @@ -16,6 +16,7 @@ #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/IToolSvc.h" #include "GaudiKernel/StatusCode.h" +#include "GaudiKernel/SystemOfUnits.h" #include "TrigSteeringEvent/TrigRoiDescriptor.h" @@ -28,7 +29,6 @@ #include "CxxUtils/fpcompare.h" -#include "CLHEP/Units/SystemOfUnits.h" class ISvcLocator; @@ -40,7 +40,7 @@ class ISvcLocator; TrigL2HVJetHypo::TrigL2HVJetHypo(const std::string& name, ISvcLocator* pSvcLocator): HLT::HypoAlgo(name, pSvcLocator) { - declareProperty("Etcut_L2", m_EtCut_L2 = 35*CLHEP::GeV, "cut value for L2 jet et"); + declareProperty("Etcut_L2", m_EtCut_L2 = 35*Gaudi::Units::GeV, "cut value for L2 jet et"); declareProperty("LRaticout_L2", m_LRatioCut_L2 = 1., "cut value for L2 jet log10 of had over em energy ratio"); declareProperty("doMonitoring_L2", m_doMonitoring = true, "switch on/off monitoring" ); declareProperty("AcceptAll", m_acceptAll=false); diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigL2HVJetHypoAllCuts.cxx b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigL2HVJetHypoAllCuts.cxx old mode 100755 new mode 100644 index 024b2e25107e1f1e165894068846a23513b0ac05..5ca6ec8297323c3ab4f1ca98bce2c67f82cf9aca --- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigL2HVJetHypoAllCuts.cxx +++ b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigL2HVJetHypoAllCuts.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // ******************************************************************** @@ -16,6 +16,7 @@ #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/IToolSvc.h" #include "GaudiKernel/StatusCode.h" +#include "GaudiKernel/SystemOfUnits.h" #include "TrigSteeringEvent/TrigRoiDescriptor.h" @@ -29,7 +30,6 @@ #include "CxxUtils/fpcompare.h" #include "CxxUtils/phihelper.h" -#include "CLHEP/Units/SystemOfUnits.h" class ISvcLocator; @@ -41,7 +41,7 @@ class ISvcLocator; TrigL2HVJetHypoAllCuts::TrigL2HVJetHypoAllCuts(const std::string& name, ISvcLocator* pSvcLocator): HLT::HypoAlgo(name, pSvcLocator) { - declareProperty("Etcut_L2", m_EtCut_L2 = 35*CLHEP::GeV, "cut value for L2 jet et"); + declareProperty("Etcut_L2", m_EtCut_L2 = 35*Gaudi::Units::GeV, "cut value for L2 jet et"); declareProperty("LRaticout_L2", m_LRatioCut_L2 = 1., "cut value for L2 jet log10 of had over em energy ratio"); declareProperty("doMonitoring_L2", m_doMonitoring = true, "switch on/off monitoring" ); declareProperty("AcceptAll", m_acceptAll=false); diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigL2HVJetHypoTrk.cxx b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigL2HVJetHypoTrk.cxx old mode 100755 new mode 100644 index e95162aac408650dfb2d5152a8d34502154b0fcf..845de575dc8dc718891c59a3fa1a847bfa73fd12 --- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigL2HVJetHypoTrk.cxx +++ b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigL2HVJetHypoTrk.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // ******************************************************************** @@ -27,7 +27,6 @@ #include "TrigInDetEvent/TrigInDetTrackHelper.h" #include "CxxUtils/phihelper.h" -#include "CLHEP/Units/SystemOfUnits.h" class ISvcLocator; diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigLoFRemovalHypo.cxx b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigLoFRemovalHypo.cxx old mode 100755 new mode 100644 index b94870f887c58b4893a5f3d061dbdf4109100446..59f602bd74eba0ed45c333fd1085981cad91683d --- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigLoFRemovalHypo.cxx +++ b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigLoFRemovalHypo.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // ******************************************************************** @@ -28,7 +28,6 @@ #include "CaloEvent/CaloCellContainer.h" #include "CaloEvent/CaloCell.h" -#include "CLHEP/Units/SystemOfUnits.h" diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigNewLoFHypo.cxx b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigNewLoFHypo.cxx old mode 100755 new mode 100644 index c21f825216da8bead77e593530afb92d0dd7a525..0c0dd63143ba28220daaa96c6a91f18a5c3f5e02 --- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigNewLoFHypo.cxx +++ b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigNewLoFHypo.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include <algorithm> @@ -19,7 +19,6 @@ #include "CaloEvent/CaloCellContainer.h" #include "CaloEvent/CaloCell.h" -#include "CLHEP/Units/SystemOfUnits.h" class ISvcLocator; diff --git a/Trigger/TrigHypothesis/TrigMissingETHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigMissingETHypo/CMakeLists.txt index 65c147e2e8eb9db1f2a08c43a1e07c240e2848cf..fc7944182c6e2a0f4cb24075193d90699083a498 100644 --- a/Trigger/TrigHypothesis/TrigMissingETHypo/CMakeLists.txt +++ b/Trigger/TrigHypothesis/TrigMissingETHypo/CMakeLists.txt @@ -1,41 +1,18 @@ -################################################################################ -# Package: TrigMissingETHypo -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigMissingETHypo ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Trigger/TrigSteer/TrigInterfaces - Trigger/TrigTools/TrigTimeAlgs - PRIVATE - Event/xAOD/xAODTrigMissingET - GaudiKernel - Trigger/TrigEvent/TrigMissingEtEvent - Trigger/TrigSteer/DecisionHandling - Trigger/TrigSteer/TrigCompositeUtils - Trigger/TrigAlgorithms/TrigEFMissingET) - -# External dependencies: -find_package( CLHEP ) - # Component(s) in the package: atlas_add_component( TrigMissingETHypo src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} TrigInterfacesLib TrigTimeAlgsLib xAODTrigMissingET GaudiKernel TrigMissingEtEvent DecisionHandlingLib TrigCompositeUtilsLib ) + LINK_LIBRARIES AsgTools AthenaBaseComps AthenaMonitoringKernelLib DecisionHandlingLib GaudiKernel TrigCompositeUtilsLib TrigInterfacesLib TrigMissingEtEvent TrigTimeAlgsLib xAODTrigMissingET ) # Install files from the package: -atlas_install_python_modules( python/*.py ) -atlas_install_joboptions( share/TriggerConfig_*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) # Unit tests: -atlas_add_test( TrigMissingETHypoConfigMT SCRIPT python -m TrigMissingETHypo.TrigMissingETHypoConfigMT +atlas_add_test( TrigMissingETHypoConfigMT + SCRIPT python -m TrigMissingETHypo.TrigMissingETHypoConfigMT PROPERTIES TIMEOUT 300 POST_EXEC_SCRIPT nopost.sh ) - -# Check Python syntax: -atlas_add_test( flake8 - SCRIPT flake8 --select=ATL,F,E7,E9,W6 --enable-extension=ATL900,ATL901 ${CMAKE_CURRENT_SOURCE_DIR}/python - POST_EXEC_SCRIPT nopost.sh ) diff --git a/Trigger/TrigHypothesis/TrigMissingETHypo/python/TrigMissingETHypoConfig.py b/Trigger/TrigHypothesis/TrigMissingETHypo/python/TrigMissingETHypoConfig.py old mode 100755 new mode 100644 diff --git a/Trigger/TrigHypothesis/TrigMissingETHypo/python/TrigMissingETHypoMonitoring.py b/Trigger/TrigHypothesis/TrigMissingETHypo/python/TrigMissingETHypoMonitoring.py old mode 100755 new mode 100644 diff --git a/Trigger/TrigHypothesis/TrigMissingETHypo/share/TriggerConfig_MET.py b/Trigger/TrigHypothesis/TrigMissingETHypo/share/TriggerConfig_MET.py deleted file mode 100755 index 37b1518126637da2d3fc8574c9b241acb54c62ca..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigMissingETHypo/share/TriggerConfig_MET.py +++ /dev/null @@ -1,60 +0,0 @@ -include.block("TrigMissingETHypo/TriggerConfig_MET.py") - -#print "METSlice Flags:" -TriggerFlags.METSlice.printFlags("MET Slice Flags") - -from TrigMissingETHypo.MissingET import MissingET -te150 = MissingET("te150") -te250 = MissingET("te250") -te360 = MissingET("te360") -te650 = MissingET("te650") -xe15 = MissingET("xe15") -xe20 = MissingET("xe20") -xe25 = MissingET("xe25") -xe30 = MissingET("xe30") -xe40 = MissingET("xe40") -xe50 = MissingET("xe50") -xe70 = MissingET("xe70") -xe80 = MissingET("xe80") - -#print deprecated? -#print "MissingETSlice Flags:" -#TriggerFlags.METSlice.printFlags(" Missing ET Slice Flags ") - -include("TrigMissingETHypo/TriggerConfig_MET_Level1.py") -if triggerMenu.signatureIsEnabled("te150"): - te150.generateMenu(triggerPythonConfig) - -if triggerMenu.signatureIsEnabled("te250"): - te250.generateMenu(triggerPythonConfig) - -if triggerMenu.signatureIsEnabled("te360"): - te360.generateMenu(triggerPythonConfig) - -if triggerMenu.signatureIsEnabled("te650"): - te650.generateMenu(triggerPythonConfig) - -if triggerMenu.signatureIsEnabled("xe15"): - xe15.generateMenu(triggerPythonConfig) - -if triggerMenu.signatureIsEnabled("xe20"): - xe20.generateMenu(triggerPythonConfig) - -if triggerMenu.signatureIsEnabled("xe25"): - xe25.generateMenu(triggerPythonConfig) - -if triggerMenu.signatureIsEnabled("xe30"): - xe30.generateMenu(triggerPythonConfig) - -if triggerMenu.signatureIsEnabled("xe40"): - xe40.generateMenu(triggerPythonConfig) - -if triggerMenu.signatureIsEnabled("xe50"): - xe50.generateMenu(triggerPythonConfig) - -if triggerMenu.signatureIsEnabled("xe70"): - xe70.generateMenu(triggerPythonConfig) - -if triggerMenu.signatureIsEnabled("xe80"): - xe80.generateMenu(triggerPythonConfig) - diff --git a/Trigger/TrigHypothesis/TrigMissingETHypo/share/TriggerConfig_MET_HLT.py b/Trigger/TrigHypothesis/TrigMissingETHypo/share/TriggerConfig_MET_HLT.py deleted file mode 100755 index c7fb4d95bfff8632e3c8b5ef624eae626ec4d5cb..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigMissingETHypo/share/TriggerConfig_MET_HLT.py +++ /dev/null @@ -1,91 +0,0 @@ -include.block("TrigMissingETHypo/TriggerConfig_MET_HLT.py") - -from TrigL2MissingET.TrigL2MissingETConfig import T2MissingET -from TrigEFMissingET.TrigEFMissingETConfig import EFMissingET_Met -from TrigMissingETHypo.TrigMissingETHypoConfig import EFMetHypo_met_xx - -def TriggerConfig_MET_HLT( L1TE , L1ITEM, sliceId, chain_number, METcut, SETcut, CutType, sigval ): - - l2chain_name = "L2_" - l2chain_name += sliceId - l2chain_name += CutType - l2chain = HLTChain( chain_name=l2chain_name, chain_counter=chain_number, lower_chain_name=L1ITEM, level="L2", prescale="1", pass_through="0") - l2chain.addTriggerTypeBit(1) - l2chain.addStreamTag("met") - - efchain_name = "EF_" - efchain_name += sliceId - efchain_name += CutType - efchain = HLTChain( chain_name=efchain_name, chain_counter=chain_number, lower_chain_name=l2chain_name, level="EF", prescale="1", pass_through="0") - efchain.addTriggerTypeBit(1) - efchain.addStreamTag("met") - - sequence=[] - - if CutType=="OR" : - AlgCut = -2.0 - else: - if CutType=="AND" : - AlgCut = -1.0 - else : - AlgCut = sigval - - if TriggerFlags.METSlice.doL2Calo(): - - # get configurables of L2 algorithms (FEX, HYPO): - l2FEXinstance = "L2METfex_" - l2FEXinstance += "ALLchain" - #l2FEXinstance += sliceId - l2Topo = T2MissingET(l2FEXinstance) - l2HYPOinstance = "L2METhypo_" - l2HYPOinstance += sliceId - l2Hypo = EFMetHypo_met_xx(l2HYPOinstance) - - # Set cut values [MeV] and OR of MET and SumET cuts - l2Hypo.MissingETCut=METcut - l2Hypo.SumETCut=SETcut - l2Hypo.CutType=AlgCut - - # set hypo to use L2 feature: - l2Hypo.METLabel = "T2MissingET" - - - if TriggerFlags.MuonSlice.doL2Muon() : - TE=triggerPythonConfig.addSequence([L1TE,"T2muFastMuon_mu6"], [ l2Topo, l2Hypo], sliceId+"_L2") - else: - print "WARNING : cannot setup LVL2 MissingET trigger to use muons, since the muons are not configured (yet) !!!" - TE=triggerPythonConfig.addSequence([L1TE], [ l2Topo, l2Hypo], sliceId+"_L2") - - print "L2 output TE= %s = %s"%(TE,sliceId+"_L2") - l2chain.addHLTSignature(TE) - - if TriggerFlags.METSlice.doEFCalo(): - # get configurables of L2 algorithms (FEX, HYPO): - efFEXinstance = "EFMETfex_" - #efFEXinstance += "ALLchain" - efFEXinstance += sliceId - efcaloMET = EFMissingET_Met(efFEXinstance) - print efcaloMET - efHYPOinstance = "EFMEThypo_" - efHYPOinstance += sliceId - efcaloMEThypo = EFMetHypo_met_xx(efHYPOinstance) - - # Set cut values [MeV] and OR of MET and SumET cuts. - efcaloMEThypo.MissingETCut=METcut - efcaloMEThypo.SumETCut=SETcut - efcaloMEThypo.CutType=AlgCut - print efcaloMEThypo - - if TriggerFlags.MuonSlice.doEFMuon() : - TE=triggerPythonConfig.addSequence( [TE, "EFID_mu6"], [ efcaloMET, efcaloMEThypo ], sliceId+"_EF") - else: - print "WARNING : cannot setup EF MissingET trigger to use muons, since the muons are not configured (yet) !!!" - TE=triggerPythonConfig.addSequence( [TE], [ efcaloMET, efcaloMEThypo ], sliceId+"_EF") - - efchain.addHLTSignature(TE) - - # -------------------------------------------------------------------- - # Add single electron signature - - triggerPythonConfig.addHLTChain(l2chain) - triggerPythonConfig.addHLTChain(efchain) diff --git a/Trigger/TrigHypothesis/TrigMissingETHypo/share/TriggerConfig_MET_Level1.py b/Trigger/TrigHypothesis/TrigMissingETHypo/share/TriggerConfig_MET_Level1.py deleted file mode 100755 index 0214fc1001e398fd1eba5488085de577bf785790..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigMissingETHypo/share/TriggerConfig_MET_Level1.py +++ /dev/null @@ -1,107 +0,0 @@ -include.block("TrigMissingETHypo/TriggerConfig_MET_Level1.py") - -# 8 thresholds on MET + 4 thresholds on SumEt - -# MET a) -th = triggerPythonConfig.addLvl1Threshold( name='XE15', type='XE', mapping=0, slot='SLOT8', connector='CON2' ) -th.addEnergyThresholdValue(value="15", etamin="-49" , etamax="49" , phimin="0" , phimax="64", priority="0") - -item = LVL1MenuItem('L1_XE15', ctpid='128', group='1', prescale=30000) -item.addAndedCondition(name='XE15', multi='1') - -triggerPythonConfig.addLVL1Item(item) - -# MET b) -th = triggerPythonConfig.addLvl1Threshold( name='XE20', type='XE', mapping=1, slot='SLOT8', connector='CON2' ) -th.addEnergyThresholdValue(value="20", etamin="-49" , etamax="49" , phimin="0" , phimax="64", priority="0") - -item = LVL1MenuItem('L1_XE20', ctpid='129', group='1', prescale=7000) -item.addAndedCondition(name='XE20', multi='1') - -triggerPythonConfig.addLVL1Item(item) - -# MET c) -th = triggerPythonConfig.addLvl1Threshold( name='XE25', type='XE', mapping=2, slot='SLOT8', connector='CON2' ) -th.addEnergyThresholdValue(value="25", etamin="-49" , etamax="49" , phimin="0" , phimax="64", priority="0") - -item = LVL1MenuItem('L1_XE25', ctpid='130', group='1', prescale=1500) -item.addAndedCondition(name='XE25', multi='1') - -triggerPythonConfig.addLVL1Item(item) - -# MET d) -th = triggerPythonConfig.addLvl1Threshold( name='XE30', type='XE', mapping=3, slot='SLOT8', connector='CON2' ) -th.addEnergyThresholdValue(value="30", etamin="-49" , etamax="49" , phimin="0" , phimax="64", priority="0") - -item = LVL1MenuItem('L1_XE30', ctpid='131', group='1', prescale=200) -item.addAndedCondition(name='XE30', multi='1') - -triggerPythonConfig.addLVL1Item(item) - -# MET e) -th = triggerPythonConfig.addLvl1Threshold( name='XE40', type='XE', mapping=4, slot='SLOT8', connector='CON2' ) -th.addEnergyThresholdValue(value="40", etamin="-49" , etamax="49" , phimin="0" , phimax="64", priority="0") - -item = LVL1MenuItem('L1_XE40', ctpid='132', group='1', prescale=20) -item.addAndedCondition(name='XE40', multi='1') - -triggerPythonConfig.addLVL1Item(item) - -# MET f) -th = triggerPythonConfig.addLvl1Threshold( name='XE50', type='XE', mapping=5, slot='SLOT8', connector='CON2' ) -th.addEnergyThresholdValue(value="50", etamin="-49" , etamax="49" , phimin="0" , phimax="64", priority="0") - -item = LVL1MenuItem('L1_XE50', ctpid='133', group='1', prescale=2) -item.addAndedCondition(name='XE50', multi='1') - -triggerPythonConfig.addLVL1Item(item) - -# MET g) -th = triggerPythonConfig.addLvl1Threshold( name='XE70', type='XE', mapping=6, slot='SLOT8', connector='CON2' ) -th.addEnergyThresholdValue(value="70", etamin="-49" , etamax="49" , phimin="0" , phimax="64", priority="0") - -item = LVL1MenuItem('L1_XE70', ctpid='134', group='1', prescale=1) -item.addAndedCondition(name='XE70', multi='1') - -triggerPythonConfig.addLVL1Item(item) - -# MET h) -th = triggerPythonConfig.addLvl1Threshold( name='XE80', type='XE', mapping=7, slot='SLOT8', connector='CON2' ) -th.addEnergyThresholdValue(value="80", etamin="-49" , etamax="49" , phimin="0" , phimax="64", priority="0") - -item = LVL1MenuItem('L1_XE80', ctpid='135', group='1', prescale=1) -item.addAndedCondition(name='XE80', multi='1') - -triggerPythonConfig.addLVL1Item(item) - -# SumET a) -th = triggerPythonConfig.addLvl1Threshold( name='TE100', type='TE', mapping=0, slot='SLOT8', connector='CON2' ) -th.addEnergyThresholdValue(value="100", etamin="-49" , etamax="49" , phimin="0" , phimax="64", priority="0") - -item = LVL1MenuItem('L1_TE100', ctpid='136', group='1', prescale=86000) -item.addAndedCondition(name='TE100', multi='1') -triggerPythonConfig.addLVL1Item(item) - -# SumET b) -th = triggerPythonConfig.addLvl1Threshold( name='TE200', type='TE', mapping=1, slot='SLOT8', connector='CON2' ) -th.addEnergyThresholdValue(value="200", etamin="-49" , etamax="49" , phimin="0" , phimax="64", priority="0") - -item = LVL1MenuItem('L1_TE200', ctpid='137', group='1', prescale=1800) -item.addAndedCondition(name='TE200', multi='1') -triggerPythonConfig.addLVL1Item(item) - -# SumET c) -th = triggerPythonConfig.addLvl1Threshold( name='TE304', type='TE', mapping=2, slot='SLOT8', connector='CON2' ) -th.addEnergyThresholdValue(value="304", etamin="-49" , etamax="49" , phimin="0" , phimax="64", priority="0") - -item = LVL1MenuItem('L1_TE304', ctpid='138', group='1', prescale=19) -item.addAndedCondition(name='TE304', multi='1') -triggerPythonConfig.addLVL1Item(item) - -# SumET d) -th = triggerPythonConfig.addLvl1Threshold( name='TE380', type='TE', mapping=3, slot='SLOT8', connector='CON2' ) -th.addEnergyThresholdValue(value="380", etamin="-49" , etamax="49" , phimin="0" , phimax="64", priority="0") - -item = LVL1MenuItem('L1_TE380', ctpid='139', group='1', prescale=1) -item.addAndedCondition(name='TE380', multi='1') -triggerPythonConfig.addLVL1Item(item) diff --git a/Trigger/TrigHypothesis/TrigMissingETHypo/share/TriggerConfig_MET_flags.py b/Trigger/TrigHypothesis/TrigMissingETHypo/share/TriggerConfig_MET_flags.py deleted file mode 100755 index 1c7a92761456d2c7eece09c56236b2bf8538f451..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigMissingETHypo/share/TriggerConfig_MET_flags.py +++ /dev/null @@ -1,17 +0,0 @@ -include.block("TrigMissingETHypo/TriggerConfig_MET_flags.py") - -triggerMenu.addSignatures(["te150","te250", "te360", "te650", "xe15", "xe20", "xe25", "xe30", "xe40", "xe50", "xe70", "xe80"]) - -triggerMenu.enableSignature("te150") -triggerMenu.enableSignature("te250") -triggerMenu.enableSignature("te360") -triggerMenu.enableSignature("te650") - -triggerMenu.enableSignature("xe15") -triggerMenu.enableSignature("xe20") -triggerMenu.enableSignature("xe25") -triggerMenu.enableSignature("xe30") -triggerMenu.enableSignature("xe40") -triggerMenu.enableSignature("xe50") -triggerMenu.enableSignature("xe70") -triggerMenu.enableSignature("xe80") diff --git a/Trigger/TrigHypothesis/TrigMissingETHypo/share/testMETSlice_jobOptions.py b/Trigger/TrigHypothesis/TrigMissingETHypo/share/testMETSlice_jobOptions.py deleted file mode 100755 index 91ad35eeb91816628d4b667931455fe9ad674765..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigMissingETHypo/share/testMETSlice_jobOptions.py +++ /dev/null @@ -1,95 +0,0 @@ -###################################################################################### -# -# This file is intended for running the MET slice in the offline software. -# By default a ttbar RDO file is used. -# -# HOWTO run: -# 1. create a run directory : cd $TestArea; mkdir run; cd run -# 2. source & get some trigger stuff : source source TriggerRelease_links.sh -# 3. copy our test jobOption file : cp ../Trigger/TrigHypothesis/TrigMissingETHypo/share/testMETSlice_jobOptions.py . -# 4. run the job : athena testMETSlice_jobOptions.py &>! log & -# -###################################################################################### - - -### usually ATN tests runs with following RDO input: -#PoolRDOInput=["/afs/cern.ch/atlas/offline/data/testfile/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.RDO.v12000301_tid003138._00016_extract_10evt.pool.root"] - - -if not ('EvtMax' in dir()): - EvtMax=10 -if not ('OutputLevel' in dir()): - OutputLevel=INFO - -### need to check if default is ok -doCBNT=False - - - -doTrigger=True -doESD=False - -doWriteAOD=False -doWriteESD=False -doWriteTAG=False -doAOD=False -doESD=False -doTAG=False - -doTruth=True -#----------------------------------------------------------- -include("RecExCommon/RecExCommon_flags.py") -#----------------------------------------------------------- - -TriggerFlags.readHLTconfigFromXML=False -TriggerFlags.readLVL1configFromXML=False - -TriggerFlags.enableMonitoring = [ 'Validation', 'Time', 'Log' ] - -#------------ This is a temporary fix --------------- -TriggerFlags.abortOnConfigurationError=True -#-------------end of temporary fix------------------- - -#### First switch all slices OFF -TriggerFlags.Slices_all_setOff() - - -# add muons for MET ... ! -if readMuonHits: - DetFlags.digitize.Muon_setOn() - DetFlags.readRIOBS.Muon_setOff() - DetFlags.readRIOPool.LVL1_setOff() - TriggerFlags.doLVL1=True - ###### This is a temporary fix ################ - DetFlags.simulateLVL1.Muon_setOn() -else: - DetFlags.digitize.Muon_setOff() - -###### This is a temporary fix ################ -DetFlags.simulateLVL1.Calo_setOn() - -# Enable MET slice -TriggerFlags.METSlice.unsetAll() -TriggerFlags.METSlice.setL2Calo() -TriggerFlags.METSlice.setEFCalo() -#TriggerFlags.doEF=False - -TriggerFlags.MuonSlice.setL2Muon() - -#----------------------------------------------------------- -include("RecExCommon/RecExCommon_topOptions.py") -#----------------------------------------------------------- - -MessageSvc.debugLimit = 10000000 -MessageSvc.Format = "% F%48W%S%7W%R%T %0W%M" - -#get rid of messages and increase speed -Service ("StoreGateSvc" ).ActivateHistory=False - -from AthenaCommon.AlgSequence import AlgSequence -print AlgSequence() -print ServiceMgr - - -AlgSequence().TrigSteer_L2.OutputLevel=VERBOSE -AlgSequence().TrigSteer_L2.T2MissingET.OutputLevel=VERBOSE diff --git a/Trigger/TrigHypothesis/TrigMissingETHypo/src/TrigEFMissingETHypo.cxx b/Trigger/TrigHypothesis/TrigMissingETHypo/src/TrigEFMissingETHypo.cxx old mode 100755 new mode 100644 index e948c83389e2462e35b4e4c3941eaf4f09f69271..eca3fd8f84d3662d9ba9f778d8ad493311240f1f --- a/Trigger/TrigHypothesis/TrigMissingETHypo/src/TrigEFMissingETHypo.cxx +++ b/Trigger/TrigHypothesis/TrigMissingETHypo/src/TrigEFMissingETHypo.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // ******************************************************************** @@ -9,7 +9,6 @@ // // AUTHOR: Kyle Cranmer, Florian Bernlochner // -// $Id: TrigEFMissingETHypo.cxx,v 1.26 2009-03-25 17:04:03 casadei Exp $ // ******************************************************************** // #include <list> @@ -20,6 +19,7 @@ #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/StatusCode.h" #include "GaudiKernel/ListItem.h" +#include "GaudiKernel/SystemOfUnits.h" #include "TrigEFMissingETHypo.h" @@ -27,7 +27,6 @@ #include "TrigMissingEtEvent/TrigMissingET.h" #include "xAODTrigMissingET/TrigMissingET.h" -#include "CLHEP/Units/SystemOfUnits.h" class ISvcLocator; @@ -40,8 +39,8 @@ TrigEFMissingETHypo::TrigEFMissingETHypo(const std::string& name, ISvcLocator* p declareProperty("METLabel", m_featureLabel = "TrigEFMissingET", "label for the MET feature in the HLT Navigation"); - declareProperty("MissingETCut", m_MEtCut = 200*CLHEP::GeV, "cut value for the MissingEt [MeV]"); - declareProperty("SumETCut", m_SumEtCut = 1000*CLHEP::GeV, "cut value for the SumEt [MeV]"); + declareProperty("MissingETCut", m_MEtCut = 200*Gaudi::Units::GeV, "cut value for the MissingEt [MeV]"); + declareProperty("SumETCut", m_SumEtCut = 1000*Gaudi::Units::GeV, "cut value for the SumEt [MeV]"); declareProperty("SigCut", m_SigCut = 30, "cut value for the SumEt"); declareProperty("CutType", m_CutType = -3.0, "val<-1.5 => MissingEt OR SumEt; -1.5<val<-0.5 => MissingEt AND SumEt; -0.5<val<0.5 => reject all events .5<val => Significance" ); @@ -50,7 +49,7 @@ TrigEFMissingETHypo::TrigEFMissingETHypo(const std::string& name, ISvcLocator* p declareProperty("doOnlyCalcCentralMET", m_doOnlyCalcCentralMET = false, "only use central MET" ); declareProperty("doL1L2FEBTest", m_doL1L2FEBTest = false, "Use L2=L1 values to Trigger FEB if MET values disagree by more than L1L2FEBTolerance GeV (for FEB only!)" ); - declareProperty("L1L2FEBTolerance", m_L1L2FEBTolerance = 100*CLHEP::GeV, "L2=L1 vs FEB tolerance in GeV" ); + declareProperty("L1L2FEBTolerance", m_L1L2FEBTolerance = 100*Gaudi::Units::GeV, "L2=L1 vs FEB tolerance in GeV" ); declareProperty("doLArH11off", m_doLArH11off = false, "LAr H11 crate is off" ); declareProperty("doLArH12off", m_doLArH12off = false, "LAr H12 crate is off" ); @@ -65,11 +64,11 @@ TrigEFMissingETHypo::TrigEFMissingETHypo(const std::string& name, ISvcLocator* p declareProperty("significanceSlope", m_significanceSlope = 1, "slope of xs"); declareProperty("significanceQuadr", m_significanceQuadr = 0, "quadratic term of xs"); - declareProperty("xsMETmin", m_xsMETmin = 10*CLHEP::GeV, "Minimum Value for MET in xs chains"); - declareProperty("xsSETmin", m_xsSETmin = 16*CLHEP::GeV, "Minimum Value for MET in xs chains"); + declareProperty("xsMETmin", m_xsMETmin = 10*Gaudi::Units::GeV, "Minimum Value for MET in xs chains"); + declareProperty("xsSETmin", m_xsSETmin = 16*Gaudi::Units::GeV, "Minimum Value for MET in xs chains"); - declareProperty("xsMETok", m_xsMETok = 64*CLHEP::GeV, "MET value for acceptance in xs chains" ); - declareProperty("xsSETok", m_xsSETok = 6500*CLHEP::GeV, "SET value for acceptance in xs chains" ); + declareProperty("xsMETok", m_xsMETok = 64*Gaudi::Units::GeV, "MET value for acceptance in xs chains" ); + declareProperty("xsSETok", m_xsSETok = 6500*Gaudi::Units::GeV, "SET value for acceptance in xs chains" ); m_bitMask = 0; declareProperty("bitMaskComp", m_bitMaskComp = 0, "bit mask to enable rejection based on the component level status flag" ); @@ -574,8 +573,8 @@ HLT::ErrorCode TrigEFMissingETHypo::hltExecute(const HLT::TriggerElement* output float SIG = 0; if( SET > 0 ) { - float SIG_numerator = MET/CLHEP::GeV; - float SIG_denominator = m_significanceOffset + m_significanceSlope*sqrt(SET/CLHEP::GeV) + m_significanceQuadr*(SET/CLHEP::GeV); + float SIG_numerator = MET/Gaudi::Units::GeV; + float SIG_denominator = m_significanceOffset + m_significanceSlope*sqrt(SET/Gaudi::Units::GeV) + m_significanceQuadr*(SET/Gaudi::Units::GeV); SIG = SIG_numerator/SIG_denominator; } else SIG=0; diff --git a/Trigger/TrigHypothesis/TrigMissingETHypo/src/TrigEFMissingETHypo.h b/Trigger/TrigHypothesis/TrigMissingETHypo/src/TrigEFMissingETHypo.h old mode 100755 new mode 100644 diff --git a/Trigger/TrigHypothesis/TrigStreamerHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigStreamerHypo/CMakeLists.txt index 17934a6237b4d4a37ce3b5f48eb03732caa7984f..5725d3f4a13e4e4683dd248e94561ee9d271be4e 100644 --- a/Trigger/TrigHypothesis/TrigStreamerHypo/CMakeLists.txt +++ b/Trigger/TrigHypothesis/TrigStreamerHypo/CMakeLists.txt @@ -1,37 +1,17 @@ -################################################################################ -# Package: TrigStreamerHypo -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigStreamerHypo ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Trigger/TrigSteer/TrigInterfaces - Trigger/TrigTools/TrigTimeAlgs - PRIVATE - GaudiKernel - Trigger/TrigSteer/DecisionHandling - Trigger/TrigSteer/TrigCompositeUtils) - -# External dependencies: -find_package( CLHEP ) - # Component(s) in the package: atlas_add_component( TrigStreamerHypo src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} TrigInterfacesLib TrigTimeAlgsLib GaudiKernel DecisionHandlingLib TrigCompositeUtilsLib ) + LINK_LIBRARIES AsgTools AthenaBaseComps DecisionHandlingLib GaudiKernel TrigCompositeUtilsLib ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) # Unit tests: atlas_add_test( TrigStreamerHypoConfigMT SCRIPT python -m TrigStreamerHypo.TrigStreamerHypoConfigMT PROPERTIES TIMEOUT 300 POST_EXEC_SCRIPT nopost.sh ) - -# Check Python syntax: -atlas_add_test( flake8 - SCRIPT flake8 --select=ATL,F,E7,E9,W6 --enable-extension=ATL900,ATL901 ${CMAKE_CURRENT_SOURCE_DIR}/python - POST_EXEC_SCRIPT nopost.sh ) diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamTool.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamTool.cxx index 7c48d50ee4f55d17e2ab6b556d7cd739a6925196..caac9a69428facdeda4280c992a29e474fcb2b71 100644 --- a/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamTool.cxx +++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamTool.cxx @@ -60,10 +60,12 @@ StatusCode L1CaloErrorByteStreamTool::finalize() // Set ROB status error void L1CaloErrorByteStreamTool::robError(const uint32_t robid, - const unsigned int err) + const unsigned int err) const { - if (err && m_robMap.find(robid) == m_robMap.end()) { - m_robMap.insert(std::make_pair(robid, err)); + ErrorMaps& maps = *m_maps; + std::scoped_lock lock (maps.m_mutex); + if (err && maps.m_robMap.find(robid) == maps.m_robMap.end()) { + maps.m_robMap.insert(std::make_pair(robid, err)); } return; } @@ -71,10 +73,12 @@ void L1CaloErrorByteStreamTool::robError(const uint32_t robid, // Set ROD unpacking error void L1CaloErrorByteStreamTool::rodError(const uint32_t robid, - const unsigned int err) + const unsigned int err) const { - if (err && m_rodMap.find(robid) == m_rodMap.end()) { - m_rodMap.insert(std::make_pair(robid, err)); + ErrorMaps& maps = *m_maps; + std::scoped_lock lock (maps.m_mutex); + if (err && maps.m_rodMap.find(robid) == maps.m_rodMap.end()) { + maps.m_rodMap.insert(std::make_pair(robid, err)); } return; } @@ -84,22 +88,24 @@ void L1CaloErrorByteStreamTool::rodError(const uint32_t robid, StatusCode L1CaloErrorByteStreamTool::errors(std::vector<unsigned int>* const errColl) { - if (!m_robMap.empty() || !m_rodMap.empty()) { - errColl->push_back(m_robMap.size()); - ErrorMap::const_iterator iter = m_robMap.begin(); - ErrorMap::const_iterator iterE = m_robMap.end(); + ErrorMaps& maps = *m_maps; + std::scoped_lock lock (maps.m_mutex); + if (!maps.m_robMap.empty() || !maps.m_rodMap.empty()) { + errColl->push_back(maps.m_robMap.size()); + ErrorMap::const_iterator iter = maps.m_robMap.begin(); + ErrorMap::const_iterator iterE = maps.m_robMap.end(); for (; iter != iterE; ++iter) { errColl->push_back(iter->first); errColl->push_back(iter->second); } - m_robMap.clear(); - iter = m_rodMap.begin(); - iterE = m_rodMap.end(); + maps.m_robMap.clear(); + iter = maps.m_rodMap.begin(); + iterE = maps.m_rodMap.end(); for (; iter != iterE; ++iter) { errColl->push_back(iter->first); errColl->push_back(iter->second); } - m_rodMap.clear(); + maps.m_rodMap.clear(); } return StatusCode::SUCCESS; } diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamTool.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamTool.h index 6bbf24809402f715209db43e0932aa8c13633090..27fadc8e2d70b459fb8b76a7aeaddc942477e84f 100644 --- a/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamTool.h +++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloErrorByteStreamTool.h @@ -12,6 +12,7 @@ #include <vector> #include "AthenaBaseComps/AthAlgTool.h" +#include "AthenaKernel/SlotSpecificObj.h" class IInterface; class InterfaceID; @@ -34,23 +35,27 @@ class L1CaloErrorByteStreamTool : public AthAlgTool { /// AlgTool InterfaceID static const InterfaceID& interfaceID(); - virtual StatusCode initialize(); - virtual StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode finalize() override; /// Set ROB status error - void robError(uint32_t robid, unsigned int err); + void robError(uint32_t robid, unsigned int err) const; /// Set ROD unpacking error - void rodError(uint32_t robid, unsigned int err); + void rodError(uint32_t robid, unsigned int err) const; /// Fill vector with accumulated errors and reset StatusCode errors(std::vector<unsigned int>* errColl); private: - // Maps of accumulated errors + // FIXME: do this in a sane way... typedef std::map<uint32_t, unsigned int> ErrorMap; - ErrorMap m_robMap; - ErrorMap m_rodMap; - + struct ErrorMaps { + // Maps of accumulated errors + ErrorMap m_robMap; + ErrorMap m_rodMap; + std::mutex m_mutex; + }; + mutable SG::SlotSpecificObj<ErrorMaps> m_maps; }; } // end namespace