ATLAS Offline Software
xAODSimHitToTgcMeasCnvAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef XAODMUONSIMHITCNV_xAODSimHitToTgcMeasurementCnvAlg_H
5 #define XAODMUONSIMHITCNV_xAODSimHitToTgcMeasurementCnvAlg_H
6 
8 
12 
15 
18 
20 #include <CLHEP/Random/RandomEngine.h>
21 
23 
32  public:
33  xAODSimHitToTgcMeasCnvAlg(const std::string& name, ISvcLocator* pSvcLocator);
34 
36 
37  StatusCode execute(const EventContext& ctx) const override;
38  StatusCode initialize() override;
39  StatusCode finalize() override;
40  private:
41  CLHEP::HepRandomEngine* getRandomEngine(const EventContext& ctx) const;
42 
43  SG::ReadHandleKey<ActsGeometryContext> m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
44 
45  SG::ReadHandleKey<xAOD::MuonSimHitContainer> m_readKey{this, "InputCollection", "xTgcSimHits",
46  "Name of the new xAOD SimHit collection"};
47 
48  SG::WriteHandleKey<xAOD::TgcStripContainer> m_writeKey{this, "OutputContainer", "xTgcStrips",
49  "Output container"};
50 
53 
54  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
55 
56  ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", ""}; // Random number service
57  Gaudi::Property<std::string> m_streamName{this, "RandomStream", "TgcSimHitForkLifting"};
58 
59 
60  mutable std::array<std::atomic<unsigned>, 2> m_allHits ATLAS_THREAD_SAFE{};
61  mutable std::array<std::atomic<unsigned>, 2> m_acceptedHits ATLAS_THREAD_SAFE{};
62 
63 
64 };
65 
66 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
xAODSimHitToTgcMeasCnvAlg::~xAODSimHitToTgcMeasCnvAlg
~xAODSimHitToTgcMeasCnvAlg()=default
MuonGMR4::MuonDetectorManager
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonDetectorManager.h:61
xAODSimHitToTgcMeasCnvAlg::execute
StatusCode execute(const EventContext &ctx) const override
Definition: xAODSimHitToTgcMeasCnvAlg.cxx:42
xAODSimHitToTgcMeasCnvAlg
The xAODSimHitToTgcMasCnvAlg is a short cut towards the TgcStrip measurement The TgcSimHits are taken...
Definition: xAODSimHitToTgcMeasCnvAlg.h:31
SG::ReadHandleKey< ActsGeometryContext >
xAODSimHitToTgcMeasCnvAlg::ATLAS_THREAD_SAFE
std::array< std::atomic< unsigned >, 2 > m_allHits ATLAS_THREAD_SAFE
Definition: xAODSimHitToTgcMeasCnvAlg.h:60
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
xAODSimHitToTgcMeasCnvAlg::m_readKey
SG::ReadHandleKey< xAOD::MuonSimHitContainer > m_readKey
Definition: xAODSimHitToTgcMeasCnvAlg.h:45
xAODSimHitToTgcMeasCnvAlg::initialize
StatusCode initialize() override
Definition: xAODSimHitToTgcMeasCnvAlg.cxx:28
TgcStripContainer.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonDetectorManager.h
xAODSimHitToTgcMeasCnvAlg::getRandomEngine
CLHEP::HepRandomEngine * getRandomEngine(const EventContext &ctx) const
Definition: xAODSimHitToTgcMeasCnvAlg.cxx:195
MuonSimHitContainer.h
xAODSimHitToTgcMeasCnvAlg::m_DetMgr
const MuonGMR4::MuonDetectorManager * m_DetMgr
Access to the new readout geometry.
Definition: xAODSimHitToTgcMeasCnvAlg.h:52
ReadCondHandleKey.h
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
xAODSimHitToTgcMeasCnvAlg::m_writeKey
SG::WriteHandleKey< xAOD::TgcStripContainer > m_writeKey
Definition: xAODSimHitToTgcMeasCnvAlg.h:48
xAODSimHitToTgcMeasCnvAlg::xAODSimHitToTgcMeasCnvAlg
xAODSimHitToTgcMeasCnvAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: xAODSimHitToTgcMeasCnvAlg.cxx:24
xAODSimHitToTgcMeasCnvAlg::finalize
StatusCode finalize() override
Definition: xAODSimHitToTgcMeasCnvAlg.cxx:36
xAODSimHitToTgcMeasCnvAlg::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Definition: xAODSimHitToTgcMeasCnvAlg.h:56
xAODSimHitToTgcMeasCnvAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: xAODSimHitToTgcMeasCnvAlg.h:54
checker_macros.h
Define macros for attributes used to control the static checker.
xAODSimHitToTgcMeasCnvAlg::m_streamName
Gaudi::Property< std::string > m_streamName
Definition: xAODSimHitToTgcMeasCnvAlg.h:57
IMuonIdHelperSvc.h
xAODSimHitToTgcMeasCnvAlg::m_geoCtxKey
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
Definition: xAODSimHitToTgcMeasCnvAlg.h:43
IAthRNGSvc.h
ServiceHandle< Muon::IMuonIdHelperSvc >