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 int m_stIdxBIL{-1}; // Station name index of the BIL stations
31 int m_stIdxBIS{-1}; // Station name index of the BIS stations
32
40 bool digitizeHit(const TimedHit& simHit,
41 const bool measuresPhi,
42 const Muon::DigitEffiData* effiMap,
43 RpcDigitCollection& outContainer,
44 CLHEP::HepRandomEngine* rndEngine,
45 DeadTimeMap& deadTimes) const;
46
53 bool digitizeHitBI(const TimedHit& simHit,
54 const Muon::DigitEffiData* effiMap,
55 RpcDigitCollection& outContainer,
56 CLHEP::HepRandomEngine* rndEngine,
57 DeadTimeMap& deadTimes) const;
58
60 static double timeOverThreshold(CLHEP::HepRandomEngine* rndmEngine) ;
61
63 SG::WriteHandleKey<RpcDigitContainer> m_writeKey{this, "OutputObjectName", "RPC_DIGITS"};
64
66 "Efficiency constants of the individual Rpc gasGaps"};
67
68 mutable std::array<std::atomic<unsigned>, 2> m_allHits ATLAS_THREAD_SAFE{};
69 mutable std::array<std::atomic<unsigned>, 2> m_acceptedHits ATLAS_THREAD_SAFE{};
70
71 Gaudi::Property<double> m_propagationVelocity{this, "propSpeed", 0.5 * Gaudi::Units::c_light,
72 "Propagation speed of the signal inside the strip"}; // in mm/ns
73
74 Gaudi::Property<double> m_stripTimeResolution{this, "timeResolution", 0.6 * Gaudi::Units::nanosecond,
75 "Estimated time resolution of the strip readout"};
76
77 Gaudi::Property<double> m_deadTime{this, "deadTime", 100.*Gaudi::Units::nanosecond};
78
79 Gaudi::Property<bool> m_digitizeMuonOnly{this, "ProcessTrueMuonsOnly", false,
80 "If set to true hit with pdgId != 13 are skipped"};
81
82 };
83}
84#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.