ATLAS Offline Software
PixelFastDigitizationTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // PixelFastDigitizationTool.h
7 // Header file for class PixelFastDigitizationTool
10 // Top algorithm class for Pixel fast digitization
12 
13 #ifndef FASTSIDIGITIZATION_PIXELFASTDIGITIZATIONTOOL_H
14 #define FASTSIDIGITIZATION_PIXELFASTDIGITIZATIONTOOL_H
15 
18 #include "InDetSimEvent/SiHit.h"
19 #include "InDetSimEvent/SiHitCollection.h" // cannot fwd declare
20 #include "InDetPrepRawData/PixelClusterContainer.h" //typedef, cannot fwd declare
22 #include "InDetPrepRawData/PixelGangedClusterAmbiguities.h" //typedef, cannot fwd declare
32 
33 //New digi
36 #include "GaudiKernel/ToolHandle.h"
37 #include "GaudiKernel/ServiceHandle.h"
38 
40 
41 #include <string>
42 #include <vector>
43 #include <map>
44 
45 
46 class PixelID;
48 
49 namespace InDetDD{
50  class SiDetectorElement;
51 }
52 namespace CLHEP {class HepRandomEngine;}
53 
54 namespace InDet {
55  class PixelCluster;
56  class PixelGangedAmbiguitiesFinder;
57 }
58 
60  virtual public PileUpToolBase
61 {
62 
63 public:
64 
67  const std::string& type,
68  const std::string& name,
69  const IInterface* parent
70  );
73 
75  StatusCode prepareEvent(const EventContext& ctx, unsigned int);
76  StatusCode processBunchXing( int bunchXing,
77  SubEventIterator bSubEvents,
78  SubEventIterator eSubEvents );
79  StatusCode processAllSubEvents(const EventContext& ctx);
80  StatusCode mergeEvent(const EventContext& ctx);
81  StatusCode digitize(const EventContext& ctx,
83  StatusCode createAndStoreRIOs(const EventContext& ctx);
84 
85 
86 
87 
88 private:
89 
90 
92 
93  ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", ""};
94 
95  StringProperty m_randomEngineName{this, "RndmEngine", "FastPixelDigitization"};
96 
97  const PixelID* m_pixel_ID{};
98 
99  PublicToolHandle<InDet::ClusterMakerTool> m_clusterMaker{this, "ClusterMaker", "InDet::ClusterMakerTool/FatrasClusterMaker"};
100  ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "PixelLorentzAngleTool", "Tool to retreive Lorentz angle"};
101  BooleanProperty m_pixUseClusterMaker{this, "PixelUseClusterMaker", true};
102 
104  StringProperty m_pixel_SiClustersName{this, "PixelClusterContainerName", "PixelClusters"};
105 
106  ServiceHandle<PileUpMergeSvc> m_mergeSvc{this, "MergeSvc", "PileUpMergeSvc"};
107  IntegerProperty m_HardScatterSplittingMode{this, "HardScatterSplittingMode", 0, "Control pileup & signal splitting"};
109 
110  typedef std::multimap<IdentifierHash, InDet::PixelCluster*> Pixel_detElement_RIO_map;
112 
113  StringProperty m_prdTruthNamePixel{this, "TruthNamePixel", "PRD_MultiTruthPixel"};
115 
116  PublicToolHandle< InDet::PixelGangedAmbiguitiesFinder > m_gangedAmbiguitiesFinder{this, "gangedAmbiguitiesFinder", "InDet::PixelGangedAmbiguitiesFinder"};
117 
118  StringProperty m_inputObjectName{this, "InputObjectName", "PixelHits"};
119 
120  std::vector<SiHitCollection*> m_siHitCollList{};
121 
123  BooleanProperty m_pixEmulateSurfaceCharge{this, "PixelEmulateSurfaceCharge", true};
124  DoubleProperty m_pixSmearPathLength{this, "PixelSmearPathSigma", 0.01};
125  BooleanProperty m_pixSmearLandau{this, "PixelSmearLandau", true};
126  DoubleProperty m_pixMinimalPathCut{this, "PixelMinimalPathLength", 0.06};
127  DoubleProperty m_pixPathLengthTotConv{this, "PixelPathLengthTotConversion", 125.};
128  BooleanProperty m_pixModuleDistortion{this, "PixelEmulateModuleDistortion", true};
129  DoubleArrayProperty m_pixPhiError{this, "PixelErrorPhi", {} };
130  DoubleArrayProperty m_pixEtaError{this, "PixelErrorEta", {} };
131  IntegerProperty m_pixErrorStrategy{this, "PixelErrorStrategy", 2};
132  DoubleProperty m_pixDiffShiftBarrX{this, "PixDiffShiftBarrX", 0.005}; //Shift of the track to improve cluster size description
133  DoubleProperty m_pixDiffShiftBarrY{this, "PixDiffShiftBarrY", 0.005}; //Shift of the track to improve cluster size description
134  DoubleProperty m_pixDiffShiftEndCX{this, "PixDiffShiftEndCX", 0.008}; //Shift of the track to improve cluster size description
135  DoubleProperty m_pixDiffShiftEndCY{this, "PixDiffShiftEndCY", 0.008}; //Shift of the track to improve cluster size description
136  DoubleProperty m_ThrConverted{this, "ThrConverted", 50000};
137 
138  bool m_mergeCluster{true};
139  short m_splitClusters{0};
141  StringProperty m_pixelClusterAmbiguitiesMapName{this, "PixelClusterAmbiguitiesMapName", "PixelClusterAmbiguitiesMap"};
144  {this, "PixelReadoutManager", "PixelReadoutManager", "Pixel readout manager" };
145 
147  {this, "PixelChargeCalibCondData", "PixelChargeCalibCondData", "Pixel charge calibration data"};
148 
149  SG::ReadCondHandleKey<PixelCalib::PixelOfflineCalibData> m_offlineCalibDataKey{this, "PixelOfflineCalibData", "PixelOfflineCalibData", "Pixel offline calibration data"};
150 
152  {this, "PixelDistortionData", "PixelDistortionData", "Output readout distortion data"};
153 
155  {this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"};
156 
157  static bool areNeighbours(const std::vector<Identifier>& group, const Identifier& rdoID, const InDetDD::SiDetectorElement* /*element*/, const PixelID& pixelID) ;
158 
161 
163 
164  PublicToolHandle<Trk::IModuleStepper> m_digitizationStepper{this, "DigitizationStepper", "Trk::PlanarModuleStepper"};
165 
167 
168  static Amg::Vector3D CalculateIntersection(const Amg::Vector3D & Point, const Amg::Vector3D & Direction, Amg::Vector2D PlaneBorder, double halfthickness) ;
169  static void Diffuse(HepGeom::Point3D<double>& localEntry, HepGeom::Point3D<double>& localExit, double shiftX, double shiftY ) ;
170  // void addSDO( const DiodeCollectionPtr& collection );
171 
172 
173 
174 };
175 
176 #endif // FASTSIDIGITIZATION_PIXELDIGITIZATION_H
PixelFastDigitizationTool::m_pixel_ID
const PixelID * m_pixel_ID
Handle to the ID helper.
Definition: PixelFastDigitizationTool.h:97
PixelFastDigitizationTool::PixelFastDigitizationTool
PixelFastDigitizationTool(const PixelFastDigitizationTool &)
PixelDistortionData.h
Hold pixel distortion data produced by PixelDistortionAlg.
PixelFastDigitizationTool::CalculateIntersection
static Amg::Vector3D CalculateIntersection(const Amg::Vector3D &Point, const Amg::Vector3D &Direction, Amg::Vector2D PlaneBorder, double halfthickness)
Definition: PixelFastDigitizationTool.cxx:981
PixelCluster
Definition: Trigger/TrigAccel/TrigCudaFitter/src/PixelCluster.h:8
PixelFastDigitizationTool::processAllSubEvents
StatusCode processAllSubEvents(const EventContext &ctx)
Definition: PixelFastDigitizationTool.cxx:204
PixelFastDigitizationTool::m_splitClusters
short m_splitClusters
merging parameter used to define two clusters as neighbour >
Definition: PixelFastDigitizationTool.h:139
PixelFastDigitizationTool::m_ThrConverted
DoubleProperty m_ThrConverted
Definition: PixelFastDigitizationTool.h:136
PixelOfflineCalibData.h
PixelFastDigitizationTool::m_pixDiffShiftBarrY
DoubleProperty m_pixDiffShiftBarrY
Definition: PixelFastDigitizationTool.h:133
PixelFastDigitizationTool::m_acceptDiagonalClusters
bool m_acceptDiagonalClusters
merging parameter used to define two clusters as neighbour >
Definition: PixelFastDigitizationTool.h:140
PixelFastDigitizationTool::m_HardScatterSplittingSkipper
bool m_HardScatterSplittingSkipper
Definition: PixelFastDigitizationTool.h:108
SiHit.h
InDet::PixelGangedClusterAmbiguities
std::multimap< const SiCluster *, const SiCluster *, ::InDet::compare_SiCluster > PixelGangedClusterAmbiguities
Definition: PixelGangedClusterAmbiguities.h:46
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
PixelFastDigitizationTool::m_lorentzAngleTool
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
Definition: PixelFastDigitizationTool.h:100
PixelFastDigitizationTool::PixelFastDigitizationTool
PixelFastDigitizationTool()
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
PRD_MultiTruthCollection
A PRD is mapped onto all contributing particles.
Definition: PRD_MultiTruthCollection.h:24
PixelFastDigitizationTool::m_pixErrorStrategy
IntegerProperty m_pixErrorStrategy
error strategy for the ClusterMaker
Definition: PixelFastDigitizationTool.h:131
DigitizationModule.h
PixelFastDigitizationTool::m_digitizationStepper
PublicToolHandle< Trk::IModuleStepper > m_digitizationStepper
Definition: PixelFastDigitizationTool.h:164
PixelFastDigitizationTool::m_pixPhiError
DoubleArrayProperty m_pixPhiError
phi error when not using the ClusterMaker
Definition: PixelFastDigitizationTool.h:129
Trk::DigitizationModule
Definition: DigitizationModule.h:50
PixelFastDigitizationTool::m_distortionKey
SG::ReadCondHandleKey< PixelDistortionData > m_distortionKey
Definition: PixelFastDigitizationTool.h:152
PixelFastDigitizationTool::m_pixPathLengthTotConv
DoubleProperty m_pixPathLengthTotConv
from path length to tot
Definition: PixelFastDigitizationTool.h:127
PixelFastDigitizationTool::m_pixTanLorentzAngleScalor
double m_pixTanLorentzAngleScalor
scale the lorentz angle effect
Definition: PixelFastDigitizationTool.h:122
PixelFastDigitizationTool::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Random number service.
Definition: PixelFastDigitizationTool.h:93
PixelFastDigitizationTool::m_mergeSvc
ServiceHandle< PileUpMergeSvc > m_mergeSvc
PileUp Merge service.
Definition: PixelFastDigitizationTool.h:106
ISiLorentzAngleTool.h
InDet::PixelClusterContainer
Trk::PrepRawDataContainer< PixelClusterCollection > PixelClusterContainer
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelClusterContainer.h:28
PixelFastDigitizationTool::buildDetectorModule
Trk::DigitizationModule * buildDetectorModule(const InDetDD::SiDetectorElement *) const
Definition: PixelFastDigitizationTool.cxx:921
PixelFastDigitizationTool::m_pixUseClusterMaker
BooleanProperty m_pixUseClusterMaker
use the pixel cluster maker or not
Definition: PixelFastDigitizationTool.h:101
PixelFastDigitizationTool::m_pixEmulateSurfaceCharge
BooleanProperty m_pixEmulateSurfaceCharge
emulate the surface charge
Definition: PixelFastDigitizationTool.h:123
PixelFastDigitizationTool::m_pixel_SiClustersName
StringProperty m_pixel_SiClustersName
Definition: PixelFastDigitizationTool.h:104
PixelFastDigitizationTool::m_siHitCollList
std::vector< SiHitCollection * > m_siHitCollList
name of the sub event hit collections.
Definition: PixelFastDigitizationTool.h:120
PixelFastDigitizationTool::m_HardScatterSplittingMode
IntegerProperty m_HardScatterSplittingMode
Process all SiHit or just those from signal or background events.
Definition: PixelFastDigitizationTool.h:107
PixelFastDigitizationTool::~PixelFastDigitizationTool
~PixelFastDigitizationTool()
Destructor.
Definition: PixelFastDigitizationTool.cxx:76
PixelFastDigitizationTool::m_chargeDataKey
SG::ReadCondHandleKey< PixelChargeCalibCondData > m_chargeDataKey
Definition: PixelFastDigitizationTool.h:147
PixelFastDigitizationTool::m_clusterMaker
PublicToolHandle< InDet::ClusterMakerTool > m_clusterMaker
ToolHandle to ClusterMaker.
Definition: PixelFastDigitizationTool.h:99
PixelFastDigitizationTool::Pixel_detElement_RIO_map
std::multimap< IdentifierHash, InDet::PixelCluster * > Pixel_detElement_RIO_map
Definition: PixelFastDigitizationTool.h:110
ClusterMakerTool.h
PixelGangedClusterAmbiguities.h
PixelFastDigitizationTool::m_gangedAmbiguitiesFinder
PublicToolHandle< InDet::PixelGangedAmbiguitiesFinder > m_gangedAmbiguitiesFinder
Definition: PixelFastDigitizationTool.h:116
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
PixelFastDigitizationTool::mergeEvent
StatusCode mergeEvent(const EventContext &ctx)
Definition: PixelFastDigitizationTool.cxx:320
PixelFastDigitizationTool::digitize
StatusCode digitize(const EventContext &ctx, TimedHitCollection< SiHit > &thpcsi)
Definition: PixelFastDigitizationTool.cxx:403
CLHEP
STD'S.
Definition: IAtRndmGenSvc.h:19
PixelFastDigitizationTool::m_randomEngineName
StringProperty m_randomEngineName
Name of the random number stream.
Definition: PixelFastDigitizationTool.h:95
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TimedHitCollection.h
PixelGangedAmbiguitiesFinder.h
PixelFastDigitizationTool::operator=
PixelFastDigitizationTool & operator=(const PixelFastDigitizationTool &)
IPixelReadoutManager.h
PixelFastDigitizationTool::m_pixDiffShiftEndCY
DoubleProperty m_pixDiffShiftEndCY
Definition: PixelFastDigitizationTool.h:135
PileUpToolBase
Definition: PileUpToolBase.h:18
ReadCondHandleKey.h
PixelFastDigitizationTool::m_pixModuleDistortion
BooleanProperty m_pixModuleDistortion
simulationn of module bowing
Definition: PixelFastDigitizationTool.h:128
PixelFastDigitizationTool::initialize
StatusCode initialize()
Definition: PixelFastDigitizationTool.cxx:83
PixelFastDigitizationTool::processBunchXing
StatusCode processBunchXing(int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents)
Definition: PixelFastDigitizationTool.cxx:163
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
PixelClusterContainer.h
ChargedTracksWeightFilter::Spline::Point
Linear spline representation of a function used to calculate weights.
Definition: ChargedTracksWeightFilter.h:28
PixelFastDigitizationTool::m_pixelClusterMap
Pixel_detElement_RIO_map * m_pixelClusterMap
Definition: PixelFastDigitizationTool.h:111
PixelFastDigitizationTool::m_thpcsi
TimedHitCollection< SiHit > * m_thpcsi
Definition: PixelFastDigitizationTool.h:91
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
PixelFastDigitizationTool::m_pixelDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Definition: PixelFastDigitizationTool.h:155
SiDetectorElementCollection.h
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
PixelFastDigitizationTool::m_prdTruthNamePixel
StringProperty m_prdTruthNamePixel
Definition: PixelFastDigitizationTool.h:113
SG::ReadCondHandleKey< PixelChargeCalibCondData >
PixelFastDigitizationTool::m_mergeCluster
bool m_mergeCluster
enable the merging of neighbour Pixel clusters >
Definition: PixelFastDigitizationTool.h:138
PixelFastDigitizationTool::m_pixDiffShiftEndCX
DoubleProperty m_pixDiffShiftEndCX
Definition: PixelFastDigitizationTool.h:134
PixelFastDigitizationTool::m_offlineCalibDataKey
SG::ReadCondHandleKey< PixelCalib::PixelOfflineCalibData > m_offlineCalibDataKey
Definition: PixelFastDigitizationTool.h:149
PixelFastDigitizationTool::m_pixelReadout
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
Definition: PixelFastDigitizationTool.h:144
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
PixelFastDigitizationTool::m_pixelClusterAmbiguitiesMapName
StringProperty m_pixelClusterAmbiguitiesMapName
Definition: PixelFastDigitizationTool.h:141
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
PixelFastDigitizationTool::m_pixMinimalPathCut
DoubleProperty m_pixMinimalPathCut
the 1.
Definition: PixelFastDigitizationTool.h:126
PileUpMergeSvc.h
the preferred mechanism to access information from the different event stores in a pileup job.
PixelFastDigitizationTool::prepareEvent
StatusCode prepareEvent(const EventContext &ctx, unsigned int)
Definition: PixelFastDigitizationTool.cxx:153
PixelFastDigitizationTool::m_pixPrdTruth
PRD_MultiTruthCollection * m_pixPrdTruth
the PRD truth map for Pixel measurements
Definition: PixelFastDigitizationTool.h:114
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
PixelFastDigitizationTool::m_pixEtaError
DoubleArrayProperty m_pixEtaError
eta error when not using the ClusterMaker
Definition: PixelFastDigitizationTool.h:130
PixelFastDigitizationTool::m_pixSmearPathLength
DoubleProperty m_pixSmearPathLength
the 2.
Definition: PixelFastDigitizationTool.h:124
SubEventIterator
std::vector< xAOD::EventInfo::SubEvent >::const_iterator SubEventIterator
Definition: IPileUpTool.h:22
PixelFastDigitizationTool::m_inputObjectName
StringProperty m_inputObjectName
Definition: PixelFastDigitizationTool.h:118
PixelFastDigitizationTool
Definition: PixelFastDigitizationTool.h:61
PixelFastDigitizationTool::m_ambiguitiesMap
InDet::PixelGangedClusterAmbiguities * m_ambiguitiesMap
Definition: PixelFastDigitizationTool.h:142
PixelFastDigitizationTool::m_pixDiffShiftBarrX
DoubleProperty m_pixDiffShiftBarrX
Definition: PixelFastDigitizationTool.h:132
PixelFastDigitizationTool::areNeighbours
static bool areNeighbours(const std::vector< Identifier > &group, const Identifier &rdoID, const InDetDD::SiDetectorElement *, const PixelID &pixelID)
Definition: PixelFastDigitizationTool.cxx:882
PixelID
Definition: PixelID.h:67
PileUpToolBase.h
helper base class IPileUpTool::toProcess().
PixelChargeCalibCondData.h
PixelFastDigitizationTool::m_pixSmearLandau
BooleanProperty m_pixSmearLandau
if true : landau else: gauss
Definition: PixelFastDigitizationTool.h:125
TimedHitCollection< SiHit >
PixelFastDigitizationTool::createAndStoreRIOs
StatusCode createAndStoreRIOs(const EventContext &ctx)
Definition: PixelFastDigitizationTool.cxx:821
PixelFastDigitizationTool::Diffuse
static void Diffuse(HepGeom::Point3D< double > &localEntry, HepGeom::Point3D< double > &localExit, double shiftX, double shiftY)
Definition: PixelFastDigitizationTool.cxx:1014
IModuleStepper.h
IAthRNGSvc.h
ServiceHandle< IAthRNGSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14
PixelFastDigitizationTool::m_pixelClusterContainer
InDet::PixelClusterContainer * m_pixelClusterContainer
the PixelClusterContainer
Definition: PixelFastDigitizationTool.h:103
SiHitCollection.h