ATLAS Offline Software
InDetBoundaryCheckTool.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 ATHENA_INNERDETECTOR_TOOLS_BOUNDARYCHECKTOOL
6 #define ATHENA_INNERDETECTOR_TOOLS_BOUNDARYCHECKTOOL
7 
9 
13 
17 
19 class SCT_ID;
20 
21 namespace InDet {
23  public:
25  const std::string &,
26  const std::string &,
27  const IInterface *
28  );
29 
30  virtual StatusCode initialize() override;
31  virtual StatusCode finalize() override;
32 
34  const Trk::TrackParameters &
35  ) const override;
36  private:
37  bool isAlivePixel(
38  const InDetDD::SiDetectorElement &element,
40  ) const;
41 
42  bool isAliveSCT(
43  const InDetDD::SiDetectorElement &element,
45  ) const;
46 
47  bool isBadSCTChipStrip(
49  const Identifier &,
50  const Trk::TrackParameters &,
52  ) const;
53 
56  const Trk::TrackParameters &
57  ) const;
58 
60 
62  {this, "GeoModelSvc", "GeoModelSvc"};
63 
64  ToolHandle<IInDetConditionsTool> m_sctCondSummaryTool{
65  this,
66  "SctSummaryTool",
67  "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool",
68  "Tool to retrieve SCT Conditions summary"
69  };
70 
71  ToolHandle<IInDetTestPixelLayerTool> m_pixelLayerTool{
72  this,
73  "PixelLayerTool",
74  "InDet::InDetTestPixelLayerTool",
75  "Tool to retrieve pixel conditions summary"
76  };
77 
79 
81  Gaudi::Property<double> m_etaTol{this, "ToleranceEta", 3.0};
82  Gaudi::Property<double> m_phiTol{this, "TolerancePhi", 3.0};
83 
85  Gaudi::Property<bool> m_usePixel{this, "UsePixel", true};
86  Gaudi::Property<bool> m_useSCT{this, "UseSCT", true};
87 
89  Gaudi::Property<bool> m_checkBadSCT{this, "CheckBadSCT", true};
90 
95  {this, "SCTDetElStatus", "", "Key of SiDetectorElementStatus for SCT"};
96 
97  const SCT_ID* m_sctID{nullptr};
98 
99  };
100 
103  if (!m_sctDetElStatus.empty()) {
105  if (!sctDetElStatus.isValid()) {
106  std::stringstream msg;
107  msg << "Failed to get " << m_sctDetElStatus.key() << " from StoreGate in " << name();
108  throw std::runtime_error(msg.str());
109  }
110  }
111  return sctDetElStatus;
112  }
113 }
114 
115 #endif
InDet::InDetBoundaryCheckTool::m_etaTol
Gaudi::Property< double > m_etaTol
eta and phi tolerances
Definition: InDetBoundaryCheckTool.h:81
IInDetConditionsTool.h
TrackParameters.h
Trk::BoundaryCheckResult
BoundaryCheckResult
Definition: IBoundaryCheckTool.h:14
SiDetectorElementStatus.h
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
InDet::InDetBoundaryCheckTool::m_sctID
const SCT_ID * m_sctID
Definition: InDetBoundaryCheckTool.h:97
InDet::InDetBoundaryCheckTool::m_usePixel
Gaudi::Property< bool > m_usePixel
Control usage of pixel and SCT info.
Definition: InDetBoundaryCheckTool.h:85
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::InDetBoundaryCheckTool::boundaryCheck
virtual Trk::BoundaryCheckResult boundaryCheck(const Trk::TrackParameters &) const override
Definition: InDetBoundaryCheckTool.cxx:205
InDet::InDetBoundaryCheckTool::isAliveSCT
bool isAliveSCT(const InDetDD::SiDetectorElement &element, const Trk::TrackParameters &parameters) const
Definition: InDetBoundaryCheckTool.cxx:64
InDet::InDetBoundaryCheckTool::m_geoModelSvc
ServiceHandle< IGeoModelSvc > m_geoModelSvc
Definition: InDetBoundaryCheckTool.h:62
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
SG::ReadHandleKey< InDet::SiDetectorElementStatus >
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
Trk::IBoundaryCheckTool
Definition: IBoundaryCheckTool.h:23
InDet::InDetBoundaryCheckTool::isAlivePixel
bool isAlivePixel(const InDetDD::SiDetectorElement &element, const Trk::TrackParameters &parameters) const
Definition: InDetBoundaryCheckTool.cxx:57
IInDetTestPixelLayerTool.h
InDet::SiDetectorElementStatus
Definition: SiDetectorElementStatus.h:62
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::InDetBoundaryCheckTool::initialize
virtual StatusCode initialize() override
Definition: InDetBoundaryCheckTool.cxx:24
InDet::InDetBoundaryCheckTool::finalize
virtual StatusCode finalize() override
Definition: InDetBoundaryCheckTool.cxx:53
AthAlgTool.h
Trk::ParametersBase
Definition: ParametersBase.h:55
InDet::InDetBoundaryCheckTool::m_pixelLayerTool
ToolHandle< IInDetTestPixelLayerTool > m_pixelLayerTool
Definition: InDetBoundaryCheckTool.h:71
InDet::InDetBoundaryCheckTool::isBadSCTChipStrip
bool isBadSCTChipStrip(const InDet::SiDetectorElementStatus *, const Identifier &, const Trk::TrackParameters &, const InDetDD::SiDetectorElement &) const
Definition: InDetBoundaryCheckTool.cxx:237
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
InDet::InDetBoundaryCheckTool::m_useSCT
Gaudi::Property< bool > m_useSCT
Definition: InDetBoundaryCheckTool.h:86
InDet::InDetBoundaryCheckTool::getSCTDetElStatus
SG::ReadHandle< InDet::SiDetectorElementStatus > getSCTDetElStatus(const EventContext &ctx) const
Definition: InDetBoundaryCheckTool.h:101
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SiDetectorElement.h
InDet::InDetBoundaryCheckTool::InDetBoundaryCheckTool
InDetBoundaryCheckTool(const std::string &, const std::string &, const IInterface *)
Definition: InDetBoundaryCheckTool.cxx:13
SCT_ID
Definition: SCT_ID.h:68
InDet::InDetBoundaryCheckTool::m_atlasId
const AtlasDetectorID * m_atlasId
Definition: InDetBoundaryCheckTool.h:78
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
IBoundaryCheckTool.h
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
AthAlgTool
Definition: AthAlgTool.h:26
InDet::InDetBoundaryCheckTool::m_sctCondSummaryTool
ToolHandle< IInDetConditionsTool > m_sctCondSummaryTool
Definition: InDetBoundaryCheckTool.h:64
InDet::InDetBoundaryCheckTool::m_checkBadSCT
Gaudi::Property< bool > m_checkBadSCT
Control check of bad SCT chip (should be false for ITk Strip)
Definition: InDetBoundaryCheckTool.h:89
InDet::InDetBoundaryCheckTool::boundaryCheckSiElement
Trk::BoundaryCheckResult boundaryCheckSiElement(const InDetDD::SiDetectorElement &, const Trk::TrackParameters &) const
Definition: InDetBoundaryCheckTool.cxx:77
IGeoModelSvc.h
InDet::InDetBoundaryCheckTool::m_sctDetElStatus
SG::ReadHandleKey< InDet::SiDetectorElementStatus > m_sctDetElStatus
Optional read handle to get status data to test whether a SCT detector element is good.
Definition: InDetBoundaryCheckTool.h:95
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
InDet::InDetBoundaryCheckTool::m_phiTol
Gaudi::Property< double > m_phiTol
Definition: InDetBoundaryCheckTool.h:82
InDet::InDetBoundaryCheckTool
Definition: InDetBoundaryCheckTool.h:22
ServiceHandle< IGeoModelSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14