ATLAS Offline Software
Loading...
Searching...
No Matches
TgcDigitizationTool.h
Go to the documentation of this file.
1/* -*- C++ -*- */
2
3/*
4 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef MUONDIGITIZATION_TGC_DIGITIZATIONTOOL_H
8#define MUONDIGITIZATION_TGC_DIGITIZATIONTOOL_H
14
16#include "GaudiKernel/ServiceHandle.h"
27
28class PileUpMergeSvc;
29class TgcDigitMaker;
30class TgcHitIdHelper;
31class TgcIdHelper;
32
33namespace CLHEP {
34class HepRandomEngine;
35}
36
37namespace MuonGM {
39}
40
42 public:
43 TgcDigitizationTool(const std::string& type, const std::string& name,
44 const IInterface* parent);
46 virtual StatusCode initialize() override final;
47
48 virtual StatusCode prepareEvent(
49 const EventContext& ctx, unsigned int /*nInputEvents*/) override final;
50
53 virtual StatusCode processBunchXing(
54 int bunchXing, SubEventIterator bSubEvents,
55 SubEventIterator eSubEvents) override final;
56
59 virtual StatusCode mergeEvent(const EventContext& ctx) override final;
60
68 virtual StatusCode processAllSubEvents(
69 const EventContext& ctx) override final;
70
72 virtual StatusCode finalize() override final;
73
74 private:
76 StatusCode getNextEvent(const EventContext& ctx);
78 StatusCode digitizeCore(const EventContext& ctx);
79
80 protected:
82 this, "PileUpMergeSvc", "PileUpMergeSvc", ""}; // Pile up service
83 ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc",
84 ""}; // Random number service
85
86 private:
92 std::list<TGCSimHitCollection*> m_TGCHitCollList;
93
94 Gaudi::Property<bool> m_onlyUseContainerName{
95 this, "OnlyUseContainerName", true,
96 "Don't use the ReadHandleKey directly. Just extract the container name "
97 "from it."};
98 Gaudi::Property<bool> m_doFourBunchDigitization{
99 this, "FourBunchDigitization", true,
100 "Do the four bunch digitization since Run-3"};
102 this, "InputObjectName", "TGC_Hits", "name of the input object"};
105 this, "TGCDigitASDposKey", "",
106 "ReadCondHandleKey for TGCDigitASDposData"};
108 this, "TGCDigitTimeOffsetKey", "",
109 "ReadCondHandleKey for TGCDigitTimeOffsetData"};
111 this, "TGCDigitCrosstalkKey", "",
112 "ReadCondHandleKey for TGCDigitCrosstalkData"};
114 this, "OutputObjectName", "TGC_DIGITS",
115 "WriteHandleKey for Output TgcDigitContainer"}; // name of the output
116 // digits
118 this, "OutputSDOName", "TGC_SDO",
119 "WriteHandleKey for Output MuonSimDataCollection"}; // name of the
120 // output SDOs
121
122 // pileup truth veto
123 Gaudi::Property<bool> m_includePileUpTruth{this, "IncludePileUpTruth", true,
124 "Include pile-up truth info"};
125};
126#endif // MUONDIGITIZATION_TGC_DIGITIZATIONTOOL_H
std::vector< xAOD::EventInfo::SubEvent >::const_iterator SubEventIterator
Definition IPileUpTool.h:22
the preferred mechanism to access information from the different event stores in a pileup job.
helper base class IPileUpTool::toProcess().
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
the preferred mechanism to access information from the different event stores in a pileup job.
PileUpToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
virtual StatusCode mergeEvent(const EventContext &ctx) override final
called at the end of the subevts loop.
StatusCode digitizeCore(const EventContext &ctx)
Core part of digitization used by processAllSubEvents and mergeEvent.
TgcDigitizationTool(const std::string &type, const std::string &name, const IInterface *parent)
TgcDigitMaker * m_digitizer
ServiceHandle< PileUpMergeSvc > m_mergeSvc
virtual StatusCode processBunchXing(int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents) override final
called for each active bunch-crossing to process current SubEvents bunchXing is in ns
const MuonGM::MuonDetectorManager * m_mdManager
SG::ReadCondHandleKey< TgcDigitCrosstalkData > m_readCondKey_Crosstalk
SG::ReadCondHandleKey< TgcDigitASDposData > m_readCondKey_ASDpos
const TgcHitIdHelper * m_hitIdHelper
TimedHitCollection< TGCSimHit > * m_thpcTGC
SG::WriteHandleKey< TgcDigitContainer > m_outputDigitCollectionKey
const TgcIdHelper * m_idHelper
SG::WriteHandleKey< MuonSimDataCollection > m_outputSDO_CollectionKey
virtual StatusCode processAllSubEvents(const EventContext &ctx) override final
alternative interface which uses the PileUpMergeSvc to obtain all the required SubEvents.
Gaudi::Property< bool > m_doFourBunchDigitization
Gaudi::Property< bool > m_onlyUseContainerName
std::list< TGCSimHitCollection * > m_TGCHitCollList
SG::ReadHandleKey< TGCSimHitCollection > m_hitsContainerKey
std::string m_inputHitCollectionName
virtual StatusCode finalize() override final
Finalize.
SG::ReadCondHandleKey< TgcDigitTimeOffsetData > m_readCondKey_TimeOffset
virtual StatusCode prepareEvent(const EventContext &ctx, unsigned int) override final
ServiceHandle< IAthRNGSvc > m_rndmSvc
Gaudi::Property< bool > m_includePileUpTruth
StatusCode getNextEvent(const EventContext &ctx)
Get next event and extract collection of hit collections.
virtual StatusCode initialize() override final
Initialize.
Ensure that the Athena extensions are properly loaded.
Definition GeoMuonHits.h:27