ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
InDet::InDetBoundaryCheckTool Class Reference

#include <InDetBoundaryCheckTool.h>

Inheritance diagram for InDet::InDetBoundaryCheckTool:
Collaboration diagram for InDet::InDetBoundaryCheckTool:

Public Member Functions

 InDetBoundaryCheckTool (const std::string &, const std::string &, const IInterface *)
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
virtual Trk::BoundaryCheckResult boundaryCheck (const Trk::TrackParameters &) const override
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

bool isAlivePixel (const InDetDD::SiDetectorElement &element, const Trk::TrackParameters &parameters) const
 
bool isAliveSCT (const InDetDD::SiDetectorElement &element, const Trk::TrackParameters &parameters) const
 
bool isBadSCTChipStrip (const InDet::SiDetectorElementStatus *, const Identifier &, const Trk::TrackParameters &, const InDetDD::SiDetectorElement &) const
 
Trk::BoundaryCheckResult boundaryCheckSiElement (const InDetDD::SiDetectorElement &, const Trk::TrackParameters &) const
 
SG::ReadHandle< InDet::SiDetectorElementStatusgetSCTDetElStatus (const EventContext &ctx) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< IGeoModelSvcm_geoModelSvc
 
ToolHandle< IInDetConditionsToolm_sctCondSummaryTool
 
ToolHandle< IInDetTestPixelLayerToolm_pixelLayerTool
 
const AtlasDetectorIDm_atlasId
 
Gaudi::Property< double > m_etaTol {this, "ToleranceEta", 3.0}
 eta and phi tolerances More...
 
Gaudi::Property< double > m_phiTol {this, "TolerancePhi", 3.0}
 
Gaudi::Property< bool > m_usePixel {this, "UsePixel", true}
 Control usage of pixel and SCT info. More...
 
Gaudi::Property< bool > m_useSCT {this, "UseSCT", true}
 
Gaudi::Property< bool > m_checkBadSCT {this, "CheckBadSCT", true}
 Control check of bad SCT chip (should be false for ITk Strip) More...
 
SG::ReadHandleKey< InDet::SiDetectorElementStatusm_sctDetElStatus {this, "SCTDetElStatus", "", "Key of SiDetectorElementStatus for SCT"}
 Optional read handle to get status data to test whether a SCT detector element is good. More...
 
const SCT_IDm_sctID {nullptr}
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 22 of file InDetBoundaryCheckTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ InDetBoundaryCheckTool()

InDet::InDetBoundaryCheckTool::InDetBoundaryCheckTool ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 13 of file InDetBoundaryCheckTool.cxx.

17  :
18  AthAlgTool(t, n, p),
19  m_geoModelSvc("GeoModelSvc", n),
20  m_atlasId(nullptr)
21 {
22  declareInterface<IBoundaryCheckTool>(this);
23  declareProperty("GeoModelService", m_geoModelSvc);
24 }

Member Function Documentation

◆ boundaryCheck()

Trk::BoundaryCheckResult InDet::InDetBoundaryCheckTool::boundaryCheck ( const Trk::TrackParameters parameters) const
overridevirtual

Implements Trk::IBoundaryCheckTool.

Definition at line 207 of file InDetBoundaryCheckTool.cxx.

209  {
210  /*
211  * Retrieve the detector element associated with our track parameters. If
212  * such an element does not exist for whatever reason, return a negative
213  * result.
214  */
215  const Trk::TrkDetElementBase *element = parameters.associatedSurface().associatedDetectorElement();
216 
217  if (element == nullptr) {
219  }
220 
221  /*
222  * Try to see if detector element is a silicon element, otherwise return a
223  * negative result: this tool is not designed to work on non-silicon
224  * elements.
225  */
226  const InDetDD::SiDetectorElement *siElement = dynamic_cast<const InDetDD::SiDetectorElement *>(element);
227 
228  if (siElement != nullptr) {
229  return boundaryCheckSiElement(*siElement, parameters);
230  } else {
231  ATH_MSG_DEBUG("TrackParameters do not belong to a type of element we can process");
233  }
234 }

◆ boundaryCheckSiElement()

Trk::BoundaryCheckResult InDet::InDetBoundaryCheckTool::boundaryCheckSiElement ( const InDetDD::SiDetectorElement siElement,
const Trk::TrackParameters parameters 
) const
private

catch if we are on the edge of an active element

Definition at line 79 of file InDetBoundaryCheckTool.cxx.

82  {
83  /*
84  * We're supporting SCT and Pixel elements. Some of the checking code can
85  * be shared, and some of it is different for these detector types. This
86  * method will perform all the shared checks that apply to both SCTs and
87  * pixels.
88  */
89  double phitol;
90  double etatol;
91 
92  /*
93  * We set our \phi and \eta tolerances by scaling the configured value in
94  * the tool's parameters by the standard deviation of the relative
95  * positions. If we do not have a covariance matrix to gather these \sigma
96  * values from, we use default parameters of 2.5 for \phi and 5.0 for
97  * \eta.
98  */
99  if (parameters.covariance() != nullptr) {
100  /*
101  * From the covariance matrix, we grab the diagonal to get the
102  * variance vector. Then, if we take the component-wise square root
103  * of that, we get a vector of \sigma. Then all we need to do is use
104  * the right indexes to retrieve the values for \eta and \phi.
105  */
106  Eigen::Matrix<double, 5, 1> var = parameters.covariance()->diagonal().cwiseSqrt();
107  etatol = m_etaTol.value() * var(Trk::iEta);
108  phitol = m_phiTol.value() * var(Trk::iPhi);
109  } else {
110  /*
111  * If we don't have the covariance matrix, set our defaults. In the
112  * future, these two default values could be lifted into separate
113  * configuration parameters.
114  */
115  phitol = 2.5;
116  etatol = 5;
117  }
118 
119 
120  /*
121  * Next, we determine whether the hit is in the active region of the
122  * element using the SiDetectorElement::inDetector() method followed by
123  * the SiIntersect::in() method.
124  */
126  parameters.localPosition(), phitol, etatol
127  );
128 
130  if (intersection.nearBoundary()){
131 
132  /*
133  * If we are around the boundary, we return a special state which
134  * will not be counted as a hole or missing hit in the pattern,
135  * while still being recorded on the trajectory for later
136  * refinement.
137  */
139  }
140 
141  if (intersection.out()) {
142  /*
143  * In this case, we are _not_ inside the active region of the element.
144  */
146  }
147 
148  /* Now, to proceed further we need to confirm that the module is actually active
149  */
150 
151  Identifier id = siElement.identify();
152 
153  bool alive;
154 
155  /*
156  * If we have not yet determined our hit to lie in any inactive region, we
157  * check whether the module hit is actually alive. For this, we deletage
158  * to two dedicated methods which essentially wrap external tools which
159  * know about element states.
160  */
161  if (m_usePixel.value() && m_atlasId->is_pixel(id)) {
162  alive = isAlivePixel(siElement, parameters);
163  } else if (m_useSCT.value() && m_atlasId->is_sct(id)) {
164  alive = isAliveSCT(siElement, parameters);
165  } else {
166  ATH_MSG_WARNING("Unsupported identifier type! "+m_atlasId->print_to_string(id));
168  }
169 
170  /*
171  * We now have all the necessary information to make a judgement about the
172  * track parameters.
173  */
174  if (alive) {
175 
176  /*
177  * now, we check whether the local position on the silicon element is
178  * near the bonding gap of the module, which is insensitive. For this, we
179  * can simply delegate to the SiDetectorElement::newBondGap() method.
180  *
181  * Keen-eyed readers may note that bond gaps are only relevant for SCT
182  * modules and that Pixels do not have them. Therefore, we can technically
183  * consider this a check relevant only to SCTs. However, as this logic is
184  * abstracted into the SiDetectorElement class, we will treat is as a
185  * shared property and a shared check.
186  */
187  if (siElement.nearBondGap(parameters.localPosition(), etatol )) {
189  }
190  /*
191  * If the module is alive and we hit the active region on it, we know
192  * we have a good hit. Note that this is the only way we can return a
193  * Candidate result! It's the only success state.
194  */
196 
197  }
198  else {
199  /*
200  * Finally, if the module is not alive, we simply return a DeadElement
201  * result.
202  */
204  }
205 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode InDet::InDetBoundaryCheckTool::finalize ( )
overridevirtual

Definition at line 55 of file InDetBoundaryCheckTool.cxx.

55  {
56  return AlgTool::finalize();
57 }

◆ getSCTDetElStatus()

SG::ReadHandle< InDet::SiDetectorElementStatus > InDet::InDetBoundaryCheckTool::getSCTDetElStatus ( const EventContext &  ctx) const
inlineprivate

Definition at line 100 of file InDetBoundaryCheckTool.h.

100  {
102  if (!m_sctDetElStatus.empty()) {
104  if (!sctDetElStatus.isValid()) {
105  std::stringstream msg;
106  msg << "Failed to get " << m_sctDetElStatus.key() << " from StoreGate in " << name();
107  throw std::runtime_error(msg.str());
108  }
109  }
110  return sctDetElStatus;
111  }

◆ initialize()

StatusCode InDet::InDetBoundaryCheckTool::initialize ( )
overridevirtual

Definition at line 26 of file InDetBoundaryCheckTool.cxx.

26  {
28 
29  if (sc.isFailure()) return sc;
30 
31  ATH_CHECK(detStore()->retrieve(m_atlasId, "AtlasID"));
32 
33  ATH_CHECK(m_pixelLayerTool.retrieve(DisableTool{!m_usePixel.value()}));
34  ATH_CHECK(m_sctCondSummaryTool.retrieve(DisableTool{!m_useSCT.value() || (!m_sctDetElStatus.empty() && !VALIDATE_STATUS_ARRAY_ACTIVATED)}));
36  if (m_useSCT.value() && !m_sctDetElStatus.empty()) {
37  ATH_CHECK( detStore()->retrieve(m_sctID,"SCT_ID") );
38  }
39 
40  if (m_checkBadSCT.value()) {
41  /*
42  * Check if ITk Strip is used because isBadSCTChipStrip method is
43  * valid only for SCT.
44  */
45  ATH_CHECK(m_geoModelSvc.retrieve());
46 
47  if (m_geoModelSvc->geoConfig()==GeoModel::GEO_RUN4) {
48  m_checkBadSCT.set(false);
49  ATH_MSG_WARNING("Since ITk Strip is used, m_check_bad_sct is turned off.");
50  }
51  }
52  return StatusCode::SUCCESS;
53 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& Trk::IBoundaryCheckTool::interfaceID ( )
inlinestaticinherited

Definition at line 27 of file IBoundaryCheckTool.h.

27  {
28  return IID_IBoundaryCheckTool;
29  }

◆ isAlivePixel()

bool InDet::InDetBoundaryCheckTool::isAlivePixel ( const InDetDD::SiDetectorElement element,
const Trk::TrackParameters parameters 
) const
private

Definition at line 59 of file InDetBoundaryCheckTool.cxx.

62  {
63  return m_pixelLayerTool->expectHit(&parameters);
64 }

◆ isAliveSCT()

bool InDet::InDetBoundaryCheckTool::isAliveSCT ( const InDetDD::SiDetectorElement element,
const Trk::TrackParameters parameters 
) const
private

Definition at line 66 of file InDetBoundaryCheckTool.cxx.

69  {
70  const EventContext& ctx{Gaudi::Hive::currentContext()};
72  if (m_checkBadSCT.value() && isBadSCTChipStrip(!m_sctDetElStatus.empty() ? sctDetElStatus.cptr() : nullptr, element.identify(), parameters, element)) {
73  return false;
74  }
75  VALIDATE_STATUS_ARRAY(!m_sctDetElStatus.empty(),sctDetElStatus->isGood(element.identifyHash()), m_sctCondSummaryTool->isGood(element.identifyHash(), ctx));
76  return !m_sctDetElStatus.empty() ? sctDetElStatus->isGood(element.identifyHash()) : m_sctCondSummaryTool->isGood(element.identifyHash(), ctx);
77 }

◆ isBadSCTChipStrip()

bool InDet::InDetBoundaryCheckTool::isBadSCTChipStrip ( const InDet::SiDetectorElementStatus sctDetElStatus,
const Identifier waferId,
const Trk::TrackParameters parameters,
const InDetDD::SiDetectorElement siElement 
) const
private

Definition at line 236 of file InDetBoundaryCheckTool.cxx.

241  {
242  // Check if the track passes through a bad SCT ABCD chip or a bad SCT strip.
243  // A chip and a strip are determined by the parameter position.
244  // Algorithm is based on InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx
245 
246  // Check the input.
247  if (!m_atlasId->is_sct(waferId)) {
248  ATH_MSG_ERROR(waferId << " is not an SCT Identifier");
249  return true;
250  }
251 
252  // Get strip id from local position.
253  // Due to the limited position resolution, we may pick up a neighboring strip...
254  const Amg::Vector2D localPos(parameters.localPosition());
255  const Identifier stripIdentifier(siElement.identifierOfPosition(localPos));
256 
257  if (!m_atlasId->is_sct(stripIdentifier)) {
258  ATH_MSG_WARNING(stripIdentifier << " is not an SCT Identifier");
259  return true;
260  }
261 
262  {
263  const EventContext& ctx{Gaudi::Hive::currentContext()};
264  if (sctDetElStatus) {
265  unsigned int chip_i=SCT::getGeometricalChipID(*m_sctID, stripIdentifier);
266  VALIDATE_STATUS_ARRAY(sctDetElStatus,sctDetElStatus->isChipGood(siElement.identifyHash(), chip_i) && sctDetElStatus->isCellGood(siElement.identifyHash(), m_sctID->strip(stripIdentifier) ),m_sctCondSummaryTool->isGood(stripIdentifier, InDetConditions::SCT_CHIP, ctx) && m_sctCondSummaryTool->isGood(stripIdentifier, InDetConditions::SCT_STRIP, ctx));
267  if (!sctDetElStatus->isChipGood(siElement.identifyHash(), chip_i)) return true;
268 
269  return !sctDetElStatus->isCellGood(siElement.identifyHash(), m_sctID->strip(stripIdentifier) );
270  }
271  else {
272  if (!m_sctCondSummaryTool->isGood(stripIdentifier, InDetConditions::SCT_CHIP, ctx)) {
273  // The position is on a bad chip.
274  return true;
275  } else if (!m_sctCondSummaryTool->isGood(stripIdentifier, InDetConditions::SCT_STRIP, ctx)) {
276  // The position is on a bad strip. (We may need to check neighboring strips.)
277  return true;
278  }
279  }
280  }
281  return false;
282 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_atlasId

const AtlasDetectorID* InDet::InDetBoundaryCheckTool::m_atlasId
private

Definition at line 77 of file InDetBoundaryCheckTool.h.

◆ m_checkBadSCT

Gaudi::Property<bool> InDet::InDetBoundaryCheckTool::m_checkBadSCT {this, "CheckBadSCT", true}
private

Control check of bad SCT chip (should be false for ITk Strip)

Definition at line 88 of file InDetBoundaryCheckTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_etaTol

Gaudi::Property<double> InDet::InDetBoundaryCheckTool::m_etaTol {this, "ToleranceEta", 3.0}
private

eta and phi tolerances

Definition at line 80 of file InDetBoundaryCheckTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_geoModelSvc

ServiceHandle<IGeoModelSvc> InDet::InDetBoundaryCheckTool::m_geoModelSvc
private

Definition at line 61 of file InDetBoundaryCheckTool.h.

◆ m_phiTol

Gaudi::Property<double> InDet::InDetBoundaryCheckTool::m_phiTol {this, "TolerancePhi", 3.0}
private

Definition at line 81 of file InDetBoundaryCheckTool.h.

◆ m_pixelLayerTool

ToolHandle<IInDetTestPixelLayerTool> InDet::InDetBoundaryCheckTool::m_pixelLayerTool
private
Initial value:
{
this,
"PixelLayerTool",
"InDet::InDetTestPixelLayerTool",
"Tool to retrieve pixel conditions summary"
}

Definition at line 70 of file InDetBoundaryCheckTool.h.

◆ m_sctCondSummaryTool

ToolHandle<IInDetConditionsTool> InDet::InDetBoundaryCheckTool::m_sctCondSummaryTool
private
Initial value:
{
this,
"SctSummaryTool",
"SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool",
"Tool to retrieve SCT Conditions summary"
}

Definition at line 63 of file InDetBoundaryCheckTool.h.

◆ m_sctDetElStatus

SG::ReadHandleKey<InDet::SiDetectorElementStatus> InDet::InDetBoundaryCheckTool::m_sctDetElStatus {this, "SCTDetElStatus", "", "Key of SiDetectorElementStatus for SCT"}
private

Optional read handle to get status data to test whether a SCT detector element is good.

If set to e.g. SCTDetectorElementStatus the event data will be used instead of the SCT conditions summary tool.

Definition at line 93 of file InDetBoundaryCheckTool.h.

◆ m_sctID

const SCT_ID* InDet::InDetBoundaryCheckTool::m_sctID {nullptr}
private

Definition at line 96 of file InDetBoundaryCheckTool.h.

◆ m_usePixel

Gaudi::Property<bool> InDet::InDetBoundaryCheckTool::m_usePixel {this, "UsePixel", true}
private

Control usage of pixel and SCT info.

Definition at line 84 of file InDetBoundaryCheckTool.h.

◆ m_useSCT

Gaudi::Property<bool> InDet::InDetBoundaryCheckTool::m_useSCT {this, "UseSCT", true}
private

Definition at line 85 of file InDetBoundaryCheckTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
InDet::InDetBoundaryCheckTool::m_etaTol
Gaudi::Property< double > m_etaTol
eta and phi tolerances
Definition: InDetBoundaryCheckTool.h:80
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
AtlasDetectorID::is_pixel
bool is_pixel(Identifier id) const
Definition: AtlasDetectorID.h:760
InDetDD::SolidStateDetectorElementBase::identifierOfPosition
Identifier identifierOfPosition(const Amg::Vector2D &localPos) const
Full identifier of the cell for a given position: assumes a raw local position (no Lorentz shift)
Definition: SolidStateDetectorElementBase.cxx:217
beamspotnt.var
var
Definition: bin/beamspotnt.py:1394
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:53
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
Trk::BoundaryCheckResult::DeadElement
@ DeadElement
outside the element
InDetDD::SolidStateDetectorElementBase::inDetector
SiIntersect inDetector(const Amg::Vector2D &localPosition, double phiTol, double etaTol) const
Test that it is in the active region.
Definition: SolidStateDetectorElementBase.cxx:204
Trk::BoundaryCheckResult::Insensitive
@ Insensitive
close to the edge of an active element
InDet::SiDetectorElementStatus::isChipGood
bool isChipGood(IdentifierHash hash, unsigned int chip) const
Definition: SiDetectorElementStatus.h:100
AtlasDetectorID::is_sct
bool is_sct(Identifier id) const
Definition: AtlasDetectorID.h:770
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
InDet::InDetBoundaryCheckTool::m_sctID
const SCT_ID * m_sctID
Definition: InDetBoundaryCheckTool.h:96
InDet::InDetBoundaryCheckTool::m_usePixel
Gaudi::Property< bool > m_usePixel
Control usage of pixel and SCT info.
Definition: InDetBoundaryCheckTool.h:84
InDetConditions::SCT_CHIP
@ SCT_CHIP
Definition: InDetHierarchy.h:14
initialize
void initialize()
Definition: run_EoverP.cxx:894
Trk::BoundaryCheckResult::Candidate
@ Candidate
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
InDet::InDetBoundaryCheckTool::isAliveSCT
bool isAliveSCT(const InDetDD::SiDetectorElement &element, const Trk::TrackParameters &parameters) const
Definition: InDetBoundaryCheckTool.cxx:66
InDet::InDetBoundaryCheckTool::m_geoModelSvc
ServiceHandle< IGeoModelSvc > m_geoModelSvc
Definition: InDetBoundaryCheckTool.h:61
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
InDet::SiDetectorElementStatus::isCellGood
bool isCellGood(IdentifierHash hash, unsigned short cell_i) const
Definition: SiDetectorElementStatus.h:107
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
intersection
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
Definition: compareFlatTrees.cxx:25
InDetDD::SolidStateDetectorElementBase::identifyHash
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
InDet::InDetBoundaryCheckTool::isAlivePixel
bool isAlivePixel(const InDetDD::SiDetectorElement &element, const Trk::TrackParameters &parameters) const
Definition: InDetBoundaryCheckTool.cxx:59
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Trk::iEta
@ iEta
(old readout) will be skipped
Definition: ParamDefs.h:54
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
VALIDATE_STATUS_ARRAY
#define VALIDATE_STATUS_ARRAY(use_info, info_val, summary_val)
Definition: SiDetectorElementStatus.h:51
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
GeoModel::GEO_RUN4
@ GEO_RUN4
Definition: IGeoDbTagSvc.h:21
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
InDet::InDetBoundaryCheckTool::m_pixelLayerTool
ToolHandle< IInDetTestPixelLayerTool > m_pixelLayerTool
Definition: InDetBoundaryCheckTool.h:70
Trk::BoundaryCheckResult::Outside
@ Outside
with the insensitive area of an active element
InDet::InDetBoundaryCheckTool::isBadSCTChipStrip
bool isBadSCTChipStrip(const InDet::SiDetectorElementStatus *, const Identifier &, const Trk::TrackParameters &, const InDetDD::SiDetectorElement &) const
Definition: InDetBoundaryCheckTool.cxx:236
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
InDet::InDetBoundaryCheckTool::m_useSCT
Gaudi::Property< bool > m_useSCT
Definition: InDetBoundaryCheckTool.h:85
InDet::InDetBoundaryCheckTool::getSCTDetElStatus
SG::ReadHandle< InDet::SiDetectorElementStatus > getSCTDetElStatus(const EventContext &ctx) const
Definition: InDetBoundaryCheckTool.h:100
AtlasDetectorID::print_to_string
std::string print_to_string(Identifier id, const IdContext *context=0) const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:655
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
Trk::iPhi
@ iPhi
Definition: ParamDefs.h:53
InDetDD::SiIntersect
Definition: SiIntersect.h:23
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
SCT_ID::strip
int strip(const Identifier &id) const
Definition: SCT_ID.h:764
InDet::InDetBoundaryCheckTool::m_atlasId
const AtlasDetectorID * m_atlasId
Definition: InDetBoundaryCheckTool.h:77
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
SCT::getGeometricalChipID
constexpr unsigned int getGeometricalChipID(unsigned int strip)
Get the geometrical chip ID for the given strip.
Definition: SCT_ChipUtils.h:71
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
InDetDD::SiDetectorElement::nearBondGap
bool nearBondGap(const Amg::Vector2D &localPosition, double etaTol) const
Test if near bond gap within tolerances.
Definition: SiDetectorElement.cxx:323
Trk::BoundaryCheckResult::Error
@ Error
within the nominally active area of a dead element
InDet::InDetBoundaryCheckTool::m_sctCondSummaryTool
ToolHandle< IInDetConditionsTool > m_sctCondSummaryTool
Definition: InDetBoundaryCheckTool.h:63
InDetConditions::SCT_STRIP
@ SCT_STRIP
Definition: InDetHierarchy.h:14
InDet::InDetBoundaryCheckTool::m_checkBadSCT
Gaudi::Property< bool > m_checkBadSCT
Control check of bad SCT chip (should be false for ITk Strip)
Definition: InDetBoundaryCheckTool.h:88
InDet::InDetBoundaryCheckTool::boundaryCheckSiElement
Trk::BoundaryCheckResult boundaryCheckSiElement(const InDetDD::SiDetectorElement &, const Trk::TrackParameters &) const
Definition: InDetBoundaryCheckTool.cxx:79
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:94
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
InDetDD::SolidStateDetectorElementBase::identify
virtual Identifier identify() const override final
identifier of this detector element (inline)
InDet::InDetBoundaryCheckTool::m_phiTol
Gaudi::Property< double > m_phiTol
Definition: InDetBoundaryCheckTool.h:81
fitman.k
k
Definition: fitman.py:528
Trk::BoundaryCheckResult::OnEdge
@ OnEdge
within the sensitive area of an active element