ATLAS Offline Software
PixelDigitizationTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
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 
26 #include "StoreGate/WriteHandle.h"
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 
39 public:
40  PixelDigitizationTool(const std::string& type, const std::string& name, const IInterface* pIID);
41 
42  virtual StatusCode initialize() override;
43  virtual StatusCode processAllSubEvents(const EventContext& ctx) override;
44  virtual StatusCode finalize() override;
45 
46  virtual StatusCode prepareEvent(const EventContext& ctx, unsigned int) override;
47  StatusCode digitizeEvent(const EventContext& ctx);
48  virtual StatusCode mergeEvent(const EventContext& ctx) override;
49  virtual StatusCode processBunchXing(int bunchXing, SubEventIterator bSubEvents,
50  SubEventIterator eSubEvents) override final;
51 protected:
52  void addSDO(SiChargedDiodeCollection* collection);
53 private:
57 
58  std::vector<SiHitCollection*> m_hitCollPtrs;
59 
60  Gaudi::Property<bool> m_onlyUseContainerName {
61  this, "OnlyUseContainerName", true, "Don't use the ReadHandleKey directly. Just extract the container name from it."
62  };
64  this, "InputObjectName", "", "Input HITS collection name"
65  };
67  this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"
68  };
69  std::string m_inputObjectName {
70  ""
71  };
73  this, "RDOCollName", "PixelRDOs", "RDO collection name"
74  };
77  this, "SDOCollName", "PixelSDO_Map", "SDO collection name"
78  };
80  Gaudi::Property<int> m_HardScatterSplittingMode {
81  this, "HardScatterSplittingMode", 0, "Control pileup & signal splitting"
82  };
84  false
85  };
86  Gaudi::Property<bool> m_onlyHitElements {
87  this, "OnlyHitElements", false, "Process only elements with hits"
88  };
89 
90  const PixelID* m_detID {};
91  Gaudi::Property<std::string> m_pixelIDName
92  {this, "PixelIDName", "PixelID", "Pixel ID name"};
93 
95 
96  ToolHandleArray<SensorSimTool> m_chargeTool {
97  this, "ChargeTools", {}, "List of charge tools"
98  };
99  ToolHandleArray<FrontEndSimTool> m_fesimTool {
100  this, "FrontEndSimTools", {}, "List of Front-End simulation tools"
101  };
102  ToolHandle<EnergyDepositionTool> m_energyDepositionTool {
103  this, "EnergyDepositionTool", "EnergyDepositionTool", "Energy deposition tool"
104  };
105 protected:
107  this, "RndmSvc", "AthRNGSvc", ""
108  };
110  this, "PileUpMergeSvc", "PileUpMergeSvc", ""
111  };
112 
113  Gaudi::Property<bool> m_createNoiseSDO {
114  this, "CreateNoiseSDO", false, "Set create noise SDO flag"
115  };
116 
117 };
118 
119 #endif // PIXELDIGITIZATION_PIXELDIGITIZATIONTOOL_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
PixelDigitizationTool::m_hitsContainerKey
SG::ReadHandleKey< SiHitCollection > m_hitsContainerKey
Definition: PixelDigitizationTool.h:63
PixelDigitizationTool::m_fesimTool
ToolHandleArray< FrontEndSimTool > m_fesimTool
Definition: PixelDigitizationTool.h:99
PixelDigitizationTool::digitizeEvent
StatusCode digitizeEvent(const EventContext &ctx)
Definition: PixelDigitizationTool.cxx:120
PixelDigitizationTool::m_mergeSvc
ServiceHandle< PileUpMergeSvc > m_mergeSvc
Definition: PixelDigitizationTool.h:109
PixelDigitizationTool::m_simDataColl
SG::WriteHandle< InDetSimDataCollection > m_simDataColl
Definition: PixelDigitizationTool.h:79
SensorSimTool.h
PixelDigitizationTool::m_inputObjectName
std::string m_inputObjectName
Definition: PixelDigitizationTool.h:69
PixelDigitizationTool::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Random number service.
Definition: PixelDigitizationTool.h:106
PixelDigitizationTool::m_timedHits
TimedHitCollection< SiHit > * m_timedHits
Definition: PixelDigitizationTool.h:94
PixelDigitizationTool::operator=
PixelDigitizationTool & operator=(const PixelDigitizationTool &)
PixelDigitizationTool::m_onlyHitElements
Gaudi::Property< bool > m_onlyHitElements
Definition: PixelDigitizationTool.h:86
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
PixelDigitizationTool::m_HardScatterSplittingSkipper
bool m_HardScatterSplittingSkipper
Definition: PixelDigitizationTool.h:83
PixelDigitizationTool::initialize
virtual StatusCode initialize() override
Definition: PixelDigitizationTool.cxx:25
PixelDigitizationTool::processBunchXing
virtual StatusCode processBunchXing(int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents) override final
Definition: PixelDigitizationTool.cxx:373
WriteHandle.h
Handle class for recording to StoreGate.
PixelDigitizationTool::m_HardScatterSplittingMode
Gaudi::Property< int > m_HardScatterSplittingMode
Definition: PixelDigitizationTool.h:80
PixelDigitizationTool::m_chargeTool
ToolHandleArray< SensorSimTool > m_chargeTool
Definition: PixelDigitizationTool.h:96
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
SiChargedDiodeCollection
Definition: SiChargedDiodeCollection.h:109
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
PixelDigitizationTool::m_createNoiseSDO
Gaudi::Property< bool > m_createNoiseSDO
Definition: PixelDigitizationTool.h:113
AthAlgTool.h
PixelDigitizationTool::m_onlyUseContainerName
Gaudi::Property< bool > m_onlyUseContainerName
Definition: PixelDigitizationTool.h:60
PixelDigitizationTool::m_simDataCollKey
SG::WriteHandleKey< InDetSimDataCollection > m_simDataCollKey
Definition: PixelDigitizationTool.h:76
TimedHitCollection.h
PixelDigitizationTool::m_pixelDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Definition: PixelDigitizationTool.h:66
PileUpToolBase
Definition: PileUpToolBase.h:18
PixelDigitizationTool::addSDO
void addSDO(SiChargedDiodeCollection *collection)
Definition: PixelDigitizationTool.cxx:279
ReadCondHandleKey.h
PixelDigitizationTool::prepareEvent
virtual StatusCode prepareEvent(const EventContext &ctx, unsigned int) override
Definition: PixelDigitizationTool.cxx:332
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
PixelDigitizationTool::m_rdoContainer
SG::WriteHandle< PixelRDO_Container > m_rdoContainer
Definition: PixelDigitizationTool.h:75
SiDetectorElementCollection.h
EnergyDepositionTool.h
PixelDigitizationTool::mergeEvent
virtual StatusCode mergeEvent(const EventContext &ctx) override
Definition: PixelDigitizationTool.cxx:355
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection >
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
FrontEndSimTool.h
PileUpMergeSvc.h
the preferred mechanism to access information from the different event stores in a pileup job.
PixelDigitizationTool::finalize
virtual StatusCode finalize() override
Definition: PixelDigitizationTool.cxx:59
PixelDigitizationTool
Definition: PixelDigitizationTool.h:38
InDetSimDataCollection.h
PixelDigitizationTool::m_rdoContainerKey
SG::WriteHandleKey< PixelRDO_Container > m_rdoContainerKey
Definition: PixelDigitizationTool.h:72
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
PixelDigitizationTool::m_hitCollPtrs
std::vector< SiHitCollection * > m_hitCollPtrs
Definition: PixelDigitizationTool.h:58
PixelDigitizationTool::m_pixelIDName
Gaudi::Property< std::string > m_pixelIDName
Definition: PixelDigitizationTool.h:92
SubEventIterator
std::vector< xAOD::EventInfo::SubEvent >::const_iterator SubEventIterator
Definition: IPileUpTool.h:22
PixelDigitizationTool::PixelDigitizationTool
PixelDigitizationTool()
PixelDigitizationTool::processAllSubEvents
virtual StatusCode processAllSubEvents(const EventContext &ctx) override
Definition: PixelDigitizationTool.cxx:66
InDetRawDataCLASS_DEF.h
PixelDigitizationTool::m_detID
const PixelID * m_detID
Definition: PixelDigitizationTool.h:90
PixelID
Definition: PixelID.h:67
PileUpToolBase.h
helper base class IPileUpTool::toProcess().
PixelDigitizationTool::m_energyDepositionTool
ToolHandle< EnergyDepositionTool > m_energyDepositionTool
Definition: PixelDigitizationTool.h:102
TimedHitCollection< SiHit >
PixelDigitizationTool::PixelDigitizationTool
PixelDigitizationTool(const PixelDigitizationTool &)
IAthRNGSvc.h
ServiceHandle< IAthRNGSvc >
SiHitCollection.h