ATLAS Offline Software
Loading...
Searching...
No Matches
PixelDigitizationTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
10
11#ifndef PIXELDIGITIZATION_PIXELDIGITIZATIONTOOL_H
12#define PIXELDIGITIZATION_PIXELDIGITIZATIONTOOL_H
13
16#include "AthenaKernel/IAthRNGSvc.h" //SvcHandle template parameter
17#include "HitManagement/TimedHitCollection.h" //template
18#include "InDetSimEvent/SiHitCollection.h" //ReadHandleKey template parameter
19
21#include "GaudiKernel/ToolHandle.h"
22#include "GaudiKernel/ServiceHandle.h"
23
28#include "PileUpTools/PileUpMergeSvc.h" //SvcHandle template parameter
29
30#include "InDetSimData/InDetSimDataCollection.h" //WriteHandleKey template parameter
31#include "SensorSimTool.h" //ToolHandleArray template parameter
32#include "FrontEndSimTool.h" //ToolHandleArray template parameter
33#include "EnergyDepositionTool.h" //ToolHandle template parameter
34
35#include "InDetReadoutGeometry/SiDetectorElementCollection.h" //ReadCondHandle Template parameter
36
37
39protected:
40 struct EventData;
41public:
42 PixelDigitizationTool(const std::string& type, const std::string& name, const IInterface* pIID);
43
44 virtual StatusCode initialize() override;
45 virtual StatusCode processAllSubEvents(const EventContext& ctx) override {
46 return processAllSubEventsConst(ctx);
47 }
48 StatusCode processAllSubEventsConst(const EventContext& ctx) const;
49 virtual StatusCode finalize() override;
50
51 virtual StatusCode prepareEvent(const EventContext& ctx, unsigned int) override {
52 if (!m_eventData) { m_eventData = std::make_unique<EventData>(); }
53 return prepareEvent(ctx, *m_eventData);
54 }
55 virtual StatusCode mergeEvent(const EventContext& ctx) override;
56 virtual StatusCode processBunchXing(int bunchXing, SubEventIterator bSubEvents,
57 SubEventIterator eSubEvents) override final;
58protected:
59 StatusCode digitizeEvent(const EventContext& ctx, EventData &event_data) const;
60 StatusCode prepareEvent(const EventContext& ctx, EventData &event_data) const;
61 void addSDO(SiChargedDiodeCollection* collection, EventData &event_data) const;
62private:
66
67 std::vector<SiHitCollection*> m_hitCollPtrs;
68
69 Gaudi::Property<bool> m_onlyUseContainerName {
70 this, "OnlyUseContainerName", true, "Don't use the ReadHandleKey directly. Just extract the container name from it."
71 };
73 this, "InputObjectName", "", "Input HITS collection name"
74 };
76 this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"
77 };
78 std::string m_inputObjectName {
79 ""
80 };
82 this, "RDOCollName", "PixelRDOs", "RDO collection name"
83 };
85 this, "SDOCollName", "PixelSDO_Map", "SDO collection name"
86 };
87 Gaudi::Property<int> m_HardScatterSplittingMode {
88 this, "HardScatterSplittingMode", 0, "Control pileup & signal splitting"
89 };
90
91protected:
100 // For old interface which stores the event data in class members
102 std::unique_ptr<EventData> m_eventData;
103private:
104 Gaudi::Property<bool> m_onlyHitElements {
105 this, "OnlyHitElements", false, "Process only elements with hits"
106 };
107
108 const PixelID* m_detID {};
109 Gaudi::Property<std::string> m_pixelIDName
110 {this, "PixelIDName", "PixelID", "Pixel ID name"};
111
112
113 ToolHandleArray<SensorSimTool> m_chargeTool {
114 this, "ChargeTools", {}, "List of charge tools"
115 };
116 ToolHandleArray<FrontEndSimTool> m_fesimTool {
117 this, "FrontEndSimTools", {}, "List of Front-End simulation tools"
118 };
119 ToolHandle<EnergyDepositionTool> m_energyDepositionTool {
120 this, "EnergyDepositionTool", "EnergyDepositionTool", "Energy deposition tool"
121 };
122protected:
124 this, "RndmSvc", "AthRNGSvc", ""
125 };
126 ServiceHandle <PileUpMergeSvc> m_mergeSvc {
127 this, "PileUpMergeSvc", "PileUpMergeSvc", ""
128 };
129
130 Gaudi::Property<bool> m_createNoiseSDO {
131 this, "CreateNoiseSDO", false, "Set create noise SDO flag"
132 };
133
134};
135
136#endif // PIXELDIGITIZATION_PIXELDIGITIZATIONTOOL_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().
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.
Handle class for recording to StoreGate.
PileUpToolBase(const std::string &type, const std::string &name, const IInterface *parent)
std::unique_ptr< EventData > m_eventData
StatusCode digitizeEvent(const EventContext &ctx, EventData &event_data) const
virtual StatusCode initialize() override
virtual StatusCode finalize() override
StatusCode processAllSubEventsConst(const EventContext &ctx) const
ServiceHandle< IAthRNGSvc > m_rndmSvc
Random number service.
Gaudi::Property< bool > m_createNoiseSDO
PixelDigitizationTool(const std::string &type, const std::string &name, const IInterface *pIID)
virtual StatusCode prepareEvent(const EventContext &ctx, unsigned int) override
Gaudi::Property< bool > m_onlyHitElements
ToolHandle< EnergyDepositionTool > m_energyDepositionTool
Gaudi::Property< std::string > m_pixelIDName
ServiceHandle< PileUpMergeSvc > m_mergeSvc
std::vector< SiHitCollection * > m_hitCollPtrs
ToolHandleArray< SensorSimTool > m_chargeTool
void addSDO(SiChargedDiodeCollection *collection, EventData &event_data) const
ToolHandleArray< FrontEndSimTool > m_fesimTool
SG::ReadHandleKey< SiHitCollection > m_hitsContainerKey
Gaudi::Property< bool > m_onlyUseContainerName
virtual StatusCode processBunchXing(int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents) override final
PixelDigitizationTool(const PixelDigitizationTool &)
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
SG::WriteHandleKey< PixelRDO_Container > m_rdoContainerKey
virtual StatusCode mergeEvent(const EventContext &ctx) override
PixelDigitizationTool & operator=(const PixelDigitizationTool &)
Gaudi::Property< int > m_HardScatterSplittingMode
SG::WriteHandleKey< InDetSimDataCollection > m_simDataCollKey
virtual StatusCode processAllSubEvents(const EventContext &ctx) override
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:67
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.
SG::WriteHandle< InDetSimDataCollection > m_simDataColl
std::unique_ptr< TimedHitCollection< SiHit > > m_timedHits
SG::WriteHandle< PixelRDO_Container > m_rdoContainer