ATLAS Offline Software
Loading...
Searching...
No Matches
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
46class PixelID;
48
49namespace InDetDD{
51}
52namespace CLHEP {class HepRandomEngine;}
53
54namespace InDet {
55 class PixelCluster;
57}
58
60 virtual public PileUpToolBase
61{
62
63public:
64
67 const std::string& type,
68 const std::string& name,
69 const IInterface* parent
70 );
73
74 StatusCode initialize();
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
88private:
89
90
92
93 ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", ""};
94
95 StringProperty m_randomEngineName{this, "RndmEngine", "FastPixelDigitization"};
96
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
103 InDet::PixelClusterContainer* m_pixelClusterContainer{};
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};
141 StringProperty m_pixelClusterAmbiguitiesMapName{this, "PixelClusterAmbiguitiesMapName", "PixelClusterAmbiguitiesMap"};
142 InDet::PixelGangedClusterAmbiguities* m_ambiguitiesMap{};
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
ChargedTracksWeightFilter::Spline::Point Point
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().
Hold pixel distortion data produced by PixelDistortionAlg.
Class to hold geometrical description of a silicon detector element.
A PRD is mapped onto all contributing particles.
PileUpToolBase(const std::string &type, const std::string &name, const IInterface *parent)
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
const PixelID * m_pixel_ID
Handle to the ID helper.
StatusCode mergeEvent(const EventContext &ctx)
StatusCode processAllSubEvents(const EventContext &ctx)
StringProperty m_randomEngineName
Name of the random number stream.
BooleanProperty m_pixUseClusterMaker
use the pixel cluster maker or not
SG::ReadCondHandleKey< PixelCalib::PixelOfflineCalibData > m_offlineCalibDataKey
StatusCode createAndStoreRIOs(const EventContext &ctx)
PublicToolHandle< Trk::IModuleStepper > m_digitizationStepper
static void Diffuse(HepGeom::Point3D< double > &localEntry, HepGeom::Point3D< double > &localExit, double shiftX, double shiftY)
bool m_acceptDiagonalClusters
merging parameter used to define two clusters as neighbour >
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
DoubleProperty m_pixPathLengthTotConv
from path length to tot
DoubleProperty m_pixSmearPathLength
the 2.
short m_splitClusters
merging parameter used to define two clusters as neighbour >
PixelFastDigitizationTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters.
BooleanProperty m_pixModuleDistortion
simulationn of module bowing
InDet::PixelGangedClusterAmbiguities * m_ambiguitiesMap
BooleanProperty m_pixEmulateSurfaceCharge
emulate the surface charge
DoubleArrayProperty m_pixEtaError
eta error when not using the ClusterMaker
static bool areNeighbours(const std::vector< Identifier > &group, const Identifier &rdoID, const InDetDD::SiDetectorElement *, const PixelID &pixelID)
bool m_mergeCluster
enable the merging of neighbour Pixel clusters >
StatusCode digitize(const EventContext &ctx, TimedHitCollection< SiHit > &thpcsi)
PublicToolHandle< InDet::PixelGangedAmbiguitiesFinder > m_gangedAmbiguitiesFinder
PixelFastDigitizationTool(const PixelFastDigitizationTool &)
SG::ReadCondHandleKey< PixelChargeCalibCondData > m_chargeDataKey
BooleanProperty m_pixSmearLandau
if true : landau else: gauss
std::vector< SiHitCollection * > m_siHitCollList
name of the sub event hit collections.
StatusCode processBunchXing(int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents)
ServiceHandle< IAthRNGSvc > m_rndmSvc
Random number service.
StatusCode prepareEvent(const EventContext &ctx, unsigned int)
TimedHitCollection< SiHit > * m_thpcsi
IntegerProperty m_HardScatterSplittingMode
Process all SiHit or just those from signal or background events.
SG::ReadCondHandleKey< PixelDistortionData > m_distortionKey
PRD_MultiTruthCollection * m_pixPrdTruth
the PRD truth map for Pixel measurements
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
static Amg::Vector3D CalculateIntersection(const Amg::Vector3D &Point, const Amg::Vector3D &Direction, Amg::Vector2D PlaneBorder, double halfthickness)
Pixel_detElement_RIO_map * m_pixelClusterMap
std::multimap< IdentifierHash, InDet::PixelCluster * > Pixel_detElement_RIO_map
Trk::DigitizationModule * buildDetectorModule(const InDetDD::SiDetectorElement *) const
InDet::PixelClusterContainer * m_pixelClusterContainer
the PixelClusterContainer
DoubleArrayProperty m_pixPhiError
phi error when not using the ClusterMaker
double m_pixTanLorentzAngleScalor
scale the lorentz angle effect
ServiceHandle< PileUpMergeSvc > m_mergeSvc
PileUp Merge service.
PixelFastDigitizationTool & operator=(const PixelFastDigitizationTool &)
PublicToolHandle< InDet::ClusterMakerTool > m_clusterMaker
ToolHandle to ClusterMaker.
IntegerProperty m_pixErrorStrategy
error strategy for the ClusterMaker
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:67
Class that holds the surfaces for a planar digitization detector module.
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
Message Stream Member.
Primary Vertex Finder.