ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_FastDigitizationTool.h
Go to the documentation of this file.
1/* -*- C++ -*- */
2
3
4/*
5 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
6*/
7
8#ifndef FASTSIDIGITZATION_SCT_FASTDIGITZATIONTOOL_H
9#define FASTSIDIGITZATION_SCT_FASTDIGITZATIONTOOL_H
15
17
19#include "InDetSimEvent/SiHit.h"
21
24
26
28
32
35
36// Gaudi
37#include "GaudiKernel/ToolHandle.h"
38#include "GaudiKernel/ServiceHandle.h"
39#include "GaudiKernel/AlgTool.h"
40
41#include <vector>
42#include <utility> /* pair */
43#include <map>
44#include <string>
45
46//FIXME - not used anywhere?
47// #ifndef MAXSTEPS
48// #define MAXSTEPS 15
49// #endif
50
51// #ifndef MAXDRIFTSTEPS
52// #define MAXDRIFTSTEPS 15
53// #endif
54
55
57
58class SCT_ID;
59
61class StoreGateService;
62
63namespace InDet {
64 class ClusterMakerTool;
65 class SCT_Cluster;
66 class SiCluster;
67}
68
69namespace CLHEP
70{
71 class HepRandomEngine;
72}
73
74namespace Trk {
75 class Surface;
76}
77
78namespace CLHEP {
79 class HepSymMatrix ;
80}
81
83 virtual public PileUpToolBase
84{
85
86public:
87 SCT_FastDigitizationTool(const std::string& type,
88 const std::string& name,
89 const IInterface* parent);
93 virtual StatusCode initialize();
94 StatusCode prepareEvent(const EventContext& ctx, unsigned int );
95 StatusCode processBunchXing( int bunchXing,
96 SubEventIterator bSubEvents,
97 SubEventIterator eSubEvents );
98 StatusCode mergeEvent(const EventContext& ctx);
99 StatusCode processAllSubEvents(const EventContext& ctx);
100 StatusCode createAndStoreRIOs(const EventContext& ctx);
101
102private:
103
104 StatusCode digitize(const EventContext& ctx,
106 bool NeighbouringClusters(const std::vector<Identifier>& potentialClusterRDOList, const InDet::SCT_Cluster *existingCluster) const;
107 static void Diffuse(HepGeom::Point3D<double>& localEntry, HepGeom::Point3D<double>& localExit, double shiftX, double shiftY ) ;
108
109 StringProperty m_inputObjectName{this, "InputObjectName", "SCT_Hits", "Input Object name"};
110
111 std::vector<SiHitCollection*> m_siHitCollList;
112
113 const SCT_ID* m_sct_ID{};
114 ServiceHandle<PileUpMergeSvc> m_mergeSvc{this, "MergeSvc", "PileUpMergeSvc", "Merge service"};
115 IntegerProperty m_HardScatterSplittingMode{this, "HardScatterSplittingMode", 0, "Control pileup & signal splitting"};
117
118 ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", ""};
119 StringProperty m_randomEngineName{this, "RndmEngine", "FastSCT_Digitization"};
120
122
123 PublicToolHandle<InDet::ClusterMakerTool> m_clusterMaker{this, "ClusterMaker", "InDet::ClusterMakerTool"};
124 ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle"};
125
126 typedef std::multimap<IdentifierHash, InDet::SCT_Cluster*> SCT_detElement_RIO_map;
128
129 SG::WriteHandleKey<InDet::SCT_ClusterContainer> m_sctClusterContainerKey{this, "SCT_ClusterContainerName", "SCT_Clusters"};
130 SG::WriteHandleKey<PRD_MultiTruthCollection> m_sctPrdTruthKey{this, "TruthNameSCT", "PRD_MultiTruthSCT"};
131 SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
132
133 DoubleProperty m_sctSmearPathLength{this, "SCT_SmearPathSigma", 0.01};
134 BooleanProperty m_sctSmearLandau{this, "SCT_SmearLandau", true};
135 BooleanProperty m_sctEmulateSurfaceCharge{this, "EmulateSurfaceCharge", true};
136 DoubleProperty m_sctTanLorentzAngleScalor{this, "SCT_ScaleTanLorentzAngle", 1.};
137 BooleanProperty m_sctAnalogStripClustering{this, "SCT_AnalogClustering", false};
138 IntegerProperty m_sctErrorStrategy{this, "SCT_ErrorStrategy", 2};
139 BooleanProperty m_sctRotateEC{this, "SCT_RotateEndcapClusters", true};
140
141 bool m_mergeCluster{true};
142 DoubleProperty m_DiffusionShiftX_barrel{this, "DiffusionShiftX_barrel",4 };
143 DoubleProperty m_DiffusionShiftY_barrel{this, "DiffusionShiftY_barrel", 4};
144 DoubleProperty m_DiffusionShiftX_endcap{this, "DiffusionShiftX_endcap", 15};
145 DoubleProperty m_DiffusionShiftY_endcap{this, "DiffusionShiftY_endcap", 15};
146 DoubleProperty m_sctMinimalPathCut{this, "SCT_MinimalPathLength", 90.};
147
149 //const Trk::Surface& surface,
150 double localStartX, double localStartY,
151 double localEndX, double localEndY,
152 double slopeYX,
153 double slopeZX,
154 const Amg::Vector2D& stripCenter,
155 int direction) ;
156
157
158
159
160};
161#endif // FASTSIDIGITZATION_SCT_FASTDIGITZATIONTOOL_H
std::vector< xAOD::EventInfo::SubEvent >::const_iterator SubEventIterator
Definition IPileUpTool.h:22
helper base class IPileUpTool::toProcess().
Handle class for recording to StoreGate.
Class to hold geometrical description of a silicon detector element.
PileUpToolBase(const std::string &type, const std::string &name, const IInterface *parent)
StatusCode processAllSubEvents(const EventContext &ctx)
BooleanProperty m_sctSmearLandau
if true : landau else: gauss
SG::WriteHandleKey< PRD_MultiTruthCollection > m_sctPrdTruthKey
the PRD truth map for SCT measurements
StringProperty m_randomEngineName
Name of the random number stream.
bool m_mergeCluster
enable the merging of neighbour SCT clusters >
const SCT_ID * m_sct_ID
Handle to the ID helper.
StatusCode digitize(const EventContext &ctx, TimedHitCollection< SiHit > &thpcsi)
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
DoubleProperty m_sctSmearPathLength
the 2.
virtual StatusCode initialize()
Called before processing physics events.
TimedHitCollection< SiHit > * m_thpcsi
static Amg::Vector3D stepToStripBorder(const InDetDD::SiDetectorElement &sidetel, double localStartX, double localStartY, double localEndX, double localEndY, double slopeYX, double slopeZX, const Amg::Vector2D &stripCenter, int direction)
IntegerProperty m_sctErrorStrategy
error strategy for the ClusterMaker
PublicToolHandle< InDet::ClusterMakerTool > m_clusterMaker
std::vector< SiHitCollection * > m_siHitCollList
name of the sub event hit collections.
StatusCode createAndStoreRIOs(const EventContext &ctx)
SCT_FastDigitizationTool(const std::string &type, const std::string &name, const IInterface *parent)
std::multimap< IdentifierHash, InDet::SCT_Cluster * > SCT_detElement_RIO_map
SCT_detElement_RIO_map * m_sctClusterMap
StatusCode prepareEvent(const EventContext &ctx, unsigned int)
SG::WriteHandleKey< InDet::SCT_ClusterContainer > m_sctClusterContainerKey
the SCT_ClusterContainer
StatusCode mergeEvent(const EventContext &ctx)
bool NeighbouringClusters(const std::vector< Identifier > &potentialClusterRDOList, const InDet::SCT_Cluster *existingCluster) const
IntegerProperty m_HardScatterSplittingMode
Process all SiHit or just those from signal or background events.
DoubleProperty m_sctMinimalPathCut
the 1.
ServiceHandle< IAthRNGSvc > m_rndmSvc
Random number service.
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
DoubleProperty m_sctTanLorentzAngleScalor
scale the lorentz angle effect
BooleanProperty m_sctEmulateSurfaceCharge
emulate the surface charge
static void Diffuse(HepGeom::Point3D< double > &localEntry, HepGeom::Point3D< double > &localExit, double shiftX, double shiftY)
BooleanProperty m_sctAnalogStripClustering
not being done in ATLAS: analog strip clustering
StatusCode processBunchXing(int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents)
ServiceHandle< PileUpMergeSvc > m_mergeSvc
PileUp Merge service.
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
Property holding a SG store/key/clid from which a WriteHandle is made.
Abstract Base Class for tracking surfaces.
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
Primary Vertex Finder.
Ensure that the ATLAS eigen extensions are properly loaded.