ATLAS Offline Software
CoreStripSpacePointFormationTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ACTSTRK_DATAPREPARATION_CORESTRIPSPACEPOINTFORMATIONTOOL_H
6 #define ACTSTRK_DATAPREPARATION_CORESTRIPSPACEPOINTFORMATIONTOOL_H
7 
9 
11 
14 #include "StripInformationHelper.h"
18 #include "Acts/SpacePointFormation/SpacePointBuilder.hpp"
20 #include "InDetIdentifier/SCT_ID.h"
22 
23 #include <string>
24 
25 namespace ActsTrk {
37 
38  class CoreStripSpacePointFormationTool: public extends<AthAlgTool, ActsTrk::IStripSpacePointFormationTool> {
39  public:
40  CoreStripSpacePointFormationTool(const std::string& type,
41  const std::string& name,
42  const IInterface* parent);
43 
44  virtual ~CoreStripSpacePointFormationTool() = default;
45 
46  virtual StatusCode initialize() override;
47 
48  virtual StatusCode produceSpacePoints( const EventContext& ctx,
49  const xAOD::StripClusterContainer& clusterContainer,
52  const Amg::Vector3D& beamSpotVertex,
53  std::vector<StripSP>& spacePoints,
54  std::vector<StripSP>& overlapSpacePoints,
55  bool processOverlaps,
56  const std::vector<IdentifierHash>& hashesToProcess,
57  const ContainerAccessor<xAOD::StripCluster, IdentifierHash, 1>& stripAccessor ) const override;
58 
59  private:
60 
61  StatusCode fillSpacePoints(const EventContext& ctx,
62  std::shared_ptr<Acts::SpacePointBuilder<StripSP>> spBuilder,
63  std::array<const InDetDD::SiDetectorElement*,nNeighbours> neighbourElements,
64  std::array<std::vector<std::pair<ATLASUncalibSourceLink, size_t>>,nNeighbours> neighbourSourceLinks,
65  std::array<double, 14> overlapExtents,
66  const Amg::Vector3D& beamSpotVertex,
67  std::vector<StripSP>& spacePoints,
68  std::vector<StripSP>& overlapSpacePoints ) const;
69 
70  StatusCode makeSpacePoint(const EventContext& ctx,
71  std::vector<StripSP>& collection,
72  std::shared_ptr<Acts::SpacePointBuilder<StripSP>> spBuilder,
73  const ATLASUncalibSourceLink& currentSlink,
74  const ATLASUncalibSourceLink& anotherSlink,
75  const InDetDD::SiDetectorElement* currentElement,
76  const InDetDD::SiDetectorElement* anotherElement,
77  const double limit,
78  const double slimit,
79  const Acts::Vector3& vertex) const;
80 
81  void updateRange(const InDetDD::SiDetectorElement& element1,
82  const InDetDD::SiDetectorElement& element2,
83  double& stripLengthGapTolerance, double& min, double& max) const;
84 
85  double computeOffset(const InDetDD::SiDetectorElement& element1,
86  const InDetDD::SiDetectorElement& element2,
87  double& stripLengthGapTolerance) const;
88 
90  double& min, double& max,
91  size_t& minStrip, size_t& maxStrip) const;
92 
93  std::pair<Amg::Vector3D, Amg::Vector3D > getStripEnds(const xAOD::StripCluster* cluster,
94  const InDetDD::SiDetectorElement* element,
95  size_t& stripIndex) const;
96  std::pair<Amg::Vector3D, Amg::Vector3D > getStripEnds(const ATLASUncalibSourceLink &sourceLink,
97  const InDetDD::SiDetectorElement* element,
98  size_t& stripIndex) const;
99  const SCT_ID* m_stripId{};
100 
101  ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "", "Tool to retreive Lorentz angle of SCT"};
102  ToolHandle<IActsTrackingGeometryTool> m_trackingGeometryTool{this, "TrackingGeometryTool", ""};
103 
105  {this, "DetectorElementToActsGeometryIdMapKey", "DetectorElementToActsGeometryIdMap",
106  "Map which associates detector elements to Acts Geometry IDs"};
107 
108  Gaudi::Property<bool> m_allClusters{this, "AllClusters", false, "Process all clusters without limits."};
109  Gaudi::Property<float> m_overlapLimitOpposite{this, "OverlapLimitOpposite", 2.8, "Overlap limit for opposite-neighbour."};
110  Gaudi::Property<float> m_overlapLimitPhi{this, "OverlapLimitPhi", 5.64, "Overlap limit for phi-neighbours."};
111  Gaudi::Property<float> m_overlapLimitEtaMin{this, "OverlapLimitEtaMin", 1.68, "Low overlap limit for eta-neighbours."};
112  Gaudi::Property<float> m_overlapLimitEtaMax{this, "OverlapLimitEtaMax", 3.0, "High overlap limit for eta-neighbours."};
113  Gaudi::Property<float> m_stripLengthTolerance{this, "StripLengthTolerance", 0.01};
114  Gaudi::Property<float> m_stripGapParameter{this, "StripGapParameter", 0.0015, "Recommend 0.001 - 0.0015 for ITK geometry"};
115  };
116 
117 }
118 
119 #endif
ActsTrk::CoreStripSpacePointFormationTool::m_detectorElementToGeometryIdMapKey
SG::ReadCondHandleKey< ActsTrk::DetectorElementToActsGeometryIdMap > m_detectorElementToGeometryIdMapKey
Definition: CoreStripSpacePointFormationTool.h:105
SiElementPropertiesTable.h
ActsTrk::CoreStripSpacePointFormationTool::m_stripLengthTolerance
Gaudi::Property< float > m_stripLengthTolerance
Definition: CoreStripSpacePointFormationTool.h:113
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
max
#define max(a, b)
Definition: cfImp.cxx:41
ContainerAccessor
Definition: ContainerAccessor.h:25
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:30
python.TestDriveDummies.properties
dictionary properties
Definition: TestDriveDummies.py:14
ActsTrk::CoreStripSpacePointFormationTool::getStripEnds
std::pair< Amg::Vector3D, Amg::Vector3D > getStripEnds(const xAOD::StripCluster *cluster, const InDetDD::SiDetectorElement *element, size_t &stripIndex) const
StripInformationHelper.h
xAOD::UncalibratedMeasurement_v1
Definition: UncalibratedMeasurement_v1.h:13
ActsTrk::CoreStripSpacePointFormationTool::makeSpacePoint
StatusCode makeSpacePoint(const EventContext &ctx, std::vector< StripSP > &collection, std::shared_ptr< Acts::SpacePointBuilder< StripSP >> spBuilder, const ATLASUncalibSourceLink &currentSlink, const ATLASUncalibSourceLink &anotherSlink, const InDetDD::SiDetectorElement *currentElement, const InDetDD::SiDetectorElement *anotherElement, const double limit, const double slimit, const Acts::Vector3 &vertex) const
Definition: CoreStripSpacePointFormationTool.cxx:506
ActsTrk::CoreStripSpacePointFormationTool
Definition: CoreStripSpacePointFormationTool.h:38
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ActsTrk::CoreStripSpacePointFormationTool::initialize
virtual StatusCode initialize() override
Definition: CoreStripSpacePointFormationTool.cxx:28
AthAlgTool.h
ActsTrk::CoreStripSpacePointFormationTool::~CoreStripSpacePointFormationTool
virtual ~CoreStripSpacePointFormationTool()=default
ActsTrk::CoreStripSpacePointFormationTool::m_stripId
const SCT_ID * m_stripId
Definition: CoreStripSpacePointFormationTool.h:99
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ActsTrk::CoreStripSpacePointFormationTool::produceSpacePoints
virtual StatusCode produceSpacePoints(const EventContext &ctx, const xAOD::StripClusterContainer &clusterContainer, const InDet::SiElementPropertiesTable &properties, const InDetDD::SiDetectorElementCollection &elements, const Amg::Vector3D &beamSpotVertex, std::vector< StripSP > &spacePoints, std::vector< StripSP > &overlapSpacePoints, bool processOverlaps, const std::vector< IdentifierHash > &hashesToProcess, const ContainerAccessor< xAOD::StripCluster, IdentifierHash, 1 > &stripAccessor) const override
Definition: CoreStripSpacePointFormationTool.cxx:37
xAOD::StripCluster_v1
Definition: StripCluster_v1.h:17
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
min
#define min(a, b)
Definition: cfImp.cxx:40
ActsTrk::CoreStripSpacePointFormationTool::m_overlapLimitPhi
Gaudi::Property< float > m_overlapLimitPhi
Definition: CoreStripSpacePointFormationTool.h:110
lumiFormat.array
array
Definition: lumiFormat.py:91
ActsTrk::CoreStripSpacePointFormationTool::m_overlapLimitOpposite
Gaudi::Property< float > m_overlapLimitOpposite
Definition: CoreStripSpacePointFormationTool.h:109
ActsTrk::CoreStripSpacePointFormationTool::m_overlapLimitEtaMin
Gaudi::Property< float > m_overlapLimitEtaMin
Definition: CoreStripSpacePointFormationTool.h:111
ActsTrk::CoreStripSpacePointFormationTool::m_overlapLimitEtaMax
Gaudi::Property< float > m_overlapLimitEtaMax
Definition: CoreStripSpacePointFormationTool.h:112
ActsTrk::CoreStripSpacePointFormationTool::m_allClusters
Gaudi::Property< bool > m_allClusters
Definition: CoreStripSpacePointFormationTool.h:108
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ActsTrk::CoreStripSpacePointFormationTool::CoreStripSpacePointFormationTool
CoreStripSpacePointFormationTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: CoreStripSpacePointFormationTool.cxx:22
ActsTrk::CoreStripSpacePointFormationTool::m_stripGapParameter
Gaudi::Property< float > m_stripGapParameter
Definition: CoreStripSpacePointFormationTool.h:114
dumpNswErrorDb.maxStrip
tuple maxStrip
Definition: dumpNswErrorDb.py:27
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
InDet::SiElementPropertiesTable
Definition: SiElementPropertiesTable.h:30
SiDetectorElementCollection.h
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ActsTrk::CoreStripSpacePointFormationTool::computeOffset
double computeOffset(const InDetDD::SiDetectorElement &element1, const InDetDD::SiDetectorElement &element2, double &stripLengthGapTolerance) const
Definition: CoreStripSpacePointFormationTool.cxx:568
SG::ReadCondHandleKey< ActsTrk::DetectorElementToActsGeometryIdMap >
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
ActsTrk::CoreStripSpacePointFormationTool::m_lorentzAngleTool
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
Definition: CoreStripSpacePointFormationTool.h:101
SCT_ID
Definition: SCT_ID.h:68
StripClusterContainer.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
dumpNswErrorDb.minStrip
int minStrip
Definition: dumpNswErrorDb.py:26
ActsTrk::CoreStripSpacePointFormationTool::correctPolarRange
void correctPolarRange(const InDetDD::SiDetectorElement *element, double &min, double &max, size_t &minStrip, size_t &maxStrip) const
Definition: CoreStripSpacePointFormationTool.cxx:612
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:49
updateCoolNtuple.limit
int limit
Definition: updateCoolNtuple.py:45
ActsTrk::nNeighbours
@ nNeighbours
Definition: StripInformationHelper.h:13
ActsTrk::CoreStripSpacePointFormationTool::fillSpacePoints
StatusCode fillSpacePoints(const EventContext &ctx, std::shared_ptr< Acts::SpacePointBuilder< StripSP >> spBuilder, std::array< const InDetDD::SiDetectorElement *, nNeighbours > neighbourElements, std::array< std::vector< std::pair< ATLASUncalibSourceLink, size_t >>, nNeighbours > neighbourSourceLinks, std::array< double, 14 > overlapExtents, const Amg::Vector3D &beamSpotVertex, std::vector< StripSP > &spacePoints, std::vector< StripSP > &overlapSpacePoints) const
Definition: CoreStripSpacePointFormationTool.cxx:304
IActsTrackingGeometryTool.h
ActsTrk::CoreStripSpacePointFormationTool::m_trackingGeometryTool
ToolHandle< IActsTrackingGeometryTool > m_trackingGeometryTool
Definition: CoreStripSpacePointFormationTool.h:102
DetectorElementToActsGeometryIdMap.h
ActsTrk::CoreStripSpacePointFormationTool::updateRange
void updateRange(const InDetDD::SiDetectorElement &element1, const InDetDD::SiDetectorElement &element2, double &stripLengthGapTolerance, double &min, double &max) const
Definition: CoreStripSpacePointFormationTool.cxx:602
IStripSpacePointFormationTool.h