ATLAS Offline Software
Loading...
Searching...
No Matches
RpcFastDigiTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef RPC_DIGITIZATIONR4_RPCFASTDIGITOOL_H
5#define RPC_DIGITIZATIONR4_RPCFASTDIGITOOL_H
6
7
11
12
13#include "GaudiKernel/PhysicalConstants.h"
14
15namespace MuonR4{
17 public:
18 using MuonDigitizationTool::MuonDigitizationTool;
19
20 StatusCode initialize() override final;
21 StatusCode finalize() override final;
22 protected:
23 StatusCode digitize(const EventContext& ctx,
24 const TimedHits& hitsToDigit,
25 xAOD::MuonSimHitContainer* sdoContainer) const override final;
26
27
28 private:
30
38 bool digitizeHit(const TimedHit& simHit,
39 const bool measuresPhi,
40 const Muon::DigitEffiData* effiMap,
41 RpcDigitCollection& outContainer,
42 CLHEP::HepRandomEngine* rndEngine,
43 DeadTimeMap& deadTimes) const;
44
51 bool digitizeHitBI(const TimedHit& simHit,
52 const Muon::DigitEffiData* effiMap,
53 RpcDigitCollection& outContainer,
54 CLHEP::HepRandomEngine* rndEngine,
55 DeadTimeMap& deadTimes) const;
56
58 static double timeOverThreshold(CLHEP::HepRandomEngine* rndmEngine) ;
59
61 SG::WriteHandleKey<RpcDigitContainer> m_writeKey{this, "OutputObjectName", "RPC_DIGITS"};
62
64 "Efficiency constants of the individual Rpc gasGaps"};
65
66 mutable std::array<std::atomic<unsigned>, 2> m_allHits ATLAS_THREAD_SAFE{};
67 mutable std::array<std::atomic<unsigned>, 2> m_acceptedHits ATLAS_THREAD_SAFE{};
68
69 Gaudi::Property<double> m_propagationVelocity{this, "propSpeed", 0.5 * Gaudi::Units::c_light,
70 "Propagation speed of the signal inside the strip"}; // in mm/ns
71
72 Gaudi::Property<double> m_stripTimeResolution{this, "timeResolution", 0.6 * Gaudi::Units::nanosecond,
73 "Estimated time resolution of the strip readout"};
74
75 Gaudi::Property<double> m_deadTime{this, "deadTime", 100.*Gaudi::Units::nanosecond};
76
77 Gaudi::Property<bool> m_digitizeMuonOnly{this, "ProcessTrueMuonsOnly", false,
78 "If set to true hit with pdgId != 13 are skipped"};
79
80 };
81}
82#endif
Barebone implementation of the I/O infrastructure for all MuonDigitizationTools.
std::vector< TimedHitPtr< xAOD::MuonSimHit > > TimedHits
std::vector< std::unique_ptr< DetType > > OutDigitCache_t
DigitContainers are sorted by DigitCollections which are the ensemble of all hits in a given MuonCham...
TimedHitPtr< xAOD::MuonSimHit > TimedHit
std::unordered_map< Identifier, double > DeadTimeMap
StatusCode finalize() override final
bool digitizeHitBI(const TimedHit &simHit, const Muon::DigitEffiData *effiMap, RpcDigitCollection &outContainer, CLHEP::HepRandomEngine *rndEngine, DeadTimeMap &deadTimes) const
Digitize the sim hit as Rpc strip 2D hit.
SG::WriteHandleKey< RpcDigitContainer > m_writeKey
Gaudi::Property< bool > m_digitizeMuonOnly
Gaudi::Property< double > m_propagationVelocity
Gaudi::Property< double > m_deadTime
static double timeOverThreshold(CLHEP::HepRandomEngine *rndmEngine)
Roll the time over threshold for each signal digit.
Gaudi::Property< double > m_stripTimeResolution
StatusCode digitize(const EventContext &ctx, const TimedHits &hitsToDigit, xAOD::MuonSimHitContainer *sdoContainer) const override final
Digitize the time ordered hits and write them to the digit format specific for the detector technolog...
OutDigitCache_t< RpcDigitCollection > DigiCache
std::array< std::atomic< unsigned >, 2 > m_allHits ATLAS_THREAD_SAFE
StatusCode initialize() override final
SG::ReadCondHandleKey< Muon::DigitEffiData > m_effiDataKey
bool digitizeHit(const TimedHit &simHit, const bool measuresPhi, const Muon::DigitEffiData *effiMap, RpcDigitCollection &outContainer, CLHEP::HepRandomEngine *rndEngine, DeadTimeMap &deadTimes) const
Digitize the sim hit as Rpc strip 1D hit.
MuonGMR4::RpcReadoutElement::EdgeSide EdgeSide
Property holding a SG store/key/clid from which a WriteHandle is made.
This header ties the generic definitions in this package.
MuonSimHitContainer_v1 MuonSimHitContainer
Define the version of the pixel cluster container.