ATLAS Offline Software
MmFastDigiTool.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 MM_DIGITIZATIONR4_MMFASTDIGITOOL_H
5 #define MM_DIGITIZATIONR4_MMFASTDIGITOOL_H
6 
7 
10 
13 
14 namespace MuonR4{
15  /***
16  * @brief: Smearing of hits stemming from muons using the best knowledge uncertainties
17  */
18  class MmFastDigiTool final: public MuonDigitizationTool {
19  public:
20  MmFastDigiTool(const std::string& type, const std::string& name, const IInterface* pIID);
21 
22  StatusCode initialize() override final;
23  StatusCode finalize() override final;
24  protected:
25  StatusCode digitize(const EventContext& ctx,
26  const TimedHits& hitsToDigit,
27  xAOD::MuonSimHitContainer* sdoContainer) const override final;
28 
29 
30  private:
32  SG::WriteHandleKey<MmDigitContainer> m_writeKey{this, "OutputObjectName", "MM_DIGITS"};
33 
34  SG::ReadCondHandleKey<Muon::DigitEffiData> m_effiDataKey{this, "EffiDataKey", "MmDigitEff",
35  "Efficiency constants of the individual Rpc gasGaps"};
36 
37  SG::ReadCondHandleKey<NswErrorCalibData> m_uncertCalibKey{this, "ErrorCalibKey", "NswUncertData",
38  "Key of the parametrized NSW uncertainties"};
39 
40 
41  mutable std::array<std::atomic<unsigned>, 8> m_allHits ATLAS_THREAD_SAFE{};
42  mutable std::array<std::atomic<unsigned>, 8> m_acceptedHits ATLAS_THREAD_SAFE{};
43 
44  // Dead time between two hits in the same channel
45  Gaudi::Property<double> m_deadTime{this, "deadTime", 300. * Gaudi::Units::ns};
46 
47  Gaudi::Property<bool> m_digitizeMuonOnly{this, "ProcessTrueMuonsOnly", false,
48  "If set to true hit with pdgId != 13 are skipped"};
49  };
50 }
51 #endif
MuonR4::MmFastDigiTool::initialize
StatusCode initialize() override final
Definition: MmFastDigiTool.cxx:19
MuonR4::MmFastDigiTool::finalize
StatusCode finalize() override final
Definition: MmFastDigiTool.cxx:26
MuonR4::MuonDigitizationTool::OutDigitCache_t
std::vector< std::unique_ptr< DetType > > OutDigitCache_t
DigitContainers are sorted by DigitCollections which are the ensemble of all hits in a given MuonCham...
Definition: MuonDigitizationTool.h:109
MuonDigitizationTool.h
SG::WriteHandleKey< MmDigitContainer >
MmDigitContainer.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonR4::MmFastDigiTool
Definition: MmFastDigiTool.h:18
MuonR4::MmFastDigiTool::m_digitizeMuonOnly
Gaudi::Property< bool > m_digitizeMuonOnly
Definition: MmFastDigiTool.h:49
MuonR4::MmFastDigiTool::DigiCache
OutDigitCache_t< MmDigitCollection > DigiCache
Definition: MmFastDigiTool.h:33
NswErrorCalibData.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
MuonR4::MmFastDigiTool::m_effiDataKey
SG::ReadCondHandleKey< Muon::DigitEffiData > m_effiDataKey
Definition: MmFastDigiTool.h:36
MuonR4::MmFastDigiTool::ATLAS_THREAD_SAFE
std::array< std::atomic< unsigned >, 8 > m_allHits ATLAS_THREAD_SAFE
Definition: MmFastDigiTool.h:43
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MuonR4::MmFastDigiTool::m_deadTime
Gaudi::Property< double > m_deadTime
Definition: MmFastDigiTool.h:47
MuonR4::MmFastDigiTool::MmFastDigiTool
MmFastDigiTool(const std::string &type, const std::string &name, const IInterface *pIID)
Definition: MmFastDigiTool.cxx:16
MuonR4
This header ties the generic definitions in this package.
Definition: HoughEventData.h:16
SG::ReadCondHandleKey< Muon::DigitEffiData >
MuonR4::MuonDigitizationTool
Barebone implementation of the I/O infrastructure for all MuonDigitizationTools.
Definition: MuonDigitizationTool.h:41
MuonR4::MuonDigitizationTool::TimedHits
std::vector< TimedHitPtr< xAOD::MuonSimHit > > TimedHits
Definition: MuonDigitizationTool.h:71
MuonR4::MmFastDigiTool::m_writeKey
SG::WriteHandleKey< MmDigitContainer > m_writeKey
Definition: MmFastDigiTool.h:34
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
python.SystemOfUnits.ns
int ns
Definition: SystemOfUnits.py:130
DigitEffiData.h
MuonR4::MmFastDigiTool::digitize
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...
Definition: MmFastDigiTool.cxx:38
MuonR4::MmFastDigiTool::m_uncertCalibKey
SG::ReadCondHandleKey< NswErrorCalibData > m_uncertCalibKey
Definition: MmFastDigiTool.h:39