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::InDetTestPixelLayerTool Class Reference

#include <InDetTestPixelLayerTool.h>

Inheritance diagram for InDet::InDetTestPixelLayerTool:
Collaboration diagram for InDet::InDetTestPixelLayerTool:

Public Member Functions

 InDetTestPixelLayerTool (const std::string &name, const std::string &n, const IInterface *p)
 
virtual StatusCode initialize () override final
 
virtual bool expectHitInPixelLayer (const EventContext &ctx, const Trk::TrackParticleBase *, int pixel_layer) const override final
 
virtual bool expectHitInPixelLayer (const EventContext &ctx, const Trk::Track *, int pixel_layer, bool checkBarrelOnly=false) const override final
 
virtual bool expectHitInPixelLayer (const EventContext &ctx, const Trk::TrackParameters *trackpar, int pixel_layer, bool checkBarrelOnly=false) const override final
 
virtual bool expectHit (const Trk::TrackParameters *trackpar) const override final
 
virtual bool getTrackStateOnPixelLayerInfo (const Trk::TrackParticleBase *, std::vector< TrackStateOnPixelLayerInfo > &infoList) const override final
 
virtual bool getTrackStateOnPixelLayerInfo (const Trk::Track *, std::vector< TrackStateOnPixelLayerInfo > &infoList) const override final
 
virtual bool getTrackStateOnPixelLayerInfo (const Trk::TrackParameters *trackpar, std::vector< TrackStateOnPixelLayerInfo > &infoList, int pixel_layer=-1, bool checkBarrelOnly=false) const override final
 
virtual double getFracGood (const Trk::TrackParticleBase *trackpar, int pixel_layer) const override final
 
virtual double getFracGood (const Trk::TrackParameters *trackpar, int pixel_layer) const override final
 
bool expectHitInInnermostPixelLayer (const EventContext &ctx, const Trk::Track *track) const
 
bool expectHitInInnermostPixelLayer (const Trk::Track *track) const
 
bool expectHitInInnermostPixelLayer (const Trk::TrackParameters *trackpar) const
 
bool expectHitInNextToInnermostPixelLayer (const EventContext &ctx, const Trk::Track *track) const
 
bool expectHitInNextToInnermostPixelLayer (const Trk::Track *track) const
 
bool expectHitInNextToInnermostPixelLayer (const Trk::TrackParameters *trackpar) const
 
bool getTrackStateOnInnermostPixelLayerInfo (const Trk::TrackParameters *trackpar, std::vector< TrackStateOnPixelLayerInfo > &infoList) const
 
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 isActive (const Trk::TrackParameters *trackpar) const
 
bool getPixelLayerParameters (const EventContext &ctx, const Trk::TrackParameters *trackpar, std::vector< std::unique_ptr< const Trk::TrackParameters >> &pixelLayerParam) const
 
bool getPixelLayerParameters (const Trk::TrackParameters *trackpar, std::vector< std::unique_ptr< const Trk::TrackParameters >> &pixelLayerParam) const
 
double getFracGood (const Trk::TrackParameters *trackpar, double phiRegionSize, double etaRegionSize, const InDet::SiDetectorElementStatus *pixelDetElStatus) const
 
SG::ReadHandle< InDet::SiDetectorElementStatusgetPixelDetElStatus (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

ToolHandle< Trk::IExtrapolatorm_extrapolator
 Pointer to Extrapolator AlgTool. More...
 
ToolHandle< IInDetConditionsToolm_pixelCondSummaryTool
 Handles to IConditionsSummaryServices for Pixels. More...
 
SG::ReadHandleKey< InDet::SiDetectorElementStatusm_pixelDetElStatus {this, "PixelDetElStatus", "", "Key of SiDetectorElementStatus for Pixel"}
 Optional read handle to get status data to test whether a pixel detector element is good. More...
 
ServiceHandle< InDetDD::IPixelReadoutManagerm_pixelReadout {this, "PixelReadoutManager", "PixelReadoutManager", "Pixel readout manager" }
 
const AtlasDetectorIDm_idHelper
 detector helper More...
 
const PixelIDm_pixelId
 ID pixel helper. More...
 
bool m_checkActiveAreas
 
bool m_checkDeadRegions
 
bool m_checkDisabledFEs
 
double m_phiRegionSize
 
double m_etaRegionSize
 
double m_goodFracCut
 
double m_outerRadius
 
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 46 of file InDetTestPixelLayerTool.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

◆ InDetTestPixelLayerTool()

InDet::InDetTestPixelLayerTool::InDetTestPixelLayerTool ( const std::string &  name,
const std::string &  n,
const IInterface *  p 
)

Definition at line 30 of file InDetTestPixelLayerTool.cxx.

33  : AthAlgTool(name, n, p)
34  , m_idHelper(nullptr)
35  , m_pixelId(nullptr)
36 {
37  declareInterface<IInDetTestPixelLayerTool>(this);
38  declareProperty("CheckActiveAreas", m_checkActiveAreas = false);
39  declareProperty("CheckDeadRegions", m_checkDeadRegions = false);
40  declareProperty("CheckDisabledFEs", m_checkDisabledFEs = false);
41  declareProperty("PhiRegionSize", m_phiRegionSize = 3.);
42  declareProperty("EtaRegionSize", m_etaRegionSize = 3.);
43  declareProperty("GoodFracCut", m_goodFracCut = 0.5);
44  declareProperty("OuterRadius", m_outerRadius = 230.);
45 }

Member Function Documentation

◆ 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; }

◆ expectHit()

bool InDet::InDet::InDetTestPixelLayerTool::expectHit ( const Trk::TrackParameters trackpar) const
finaloverridevirtual

will be set to true if at least one good module is passed

pass good module -> hit is expected on pixelLayer

check dead regions

pass good module -> hit is expected on pixelLayer

Implements InDet::IInDetTestPixelLayerTool.

Definition at line 210 of file InDetTestPixelLayerTool.cxx.

212 {
213  bool expect_hit =
214  false;
215 
216  Identifier id =
218 
219 
220  const EventContext& ctx = Gaudi::Hive::currentContext();
222 
225  pixelDetElStatus->isGood(trackpar->associatedSurface().associatedDetectorElement()->identifyHash()),
227  if ((!m_pixelDetElStatus.empty() &&
228  pixelDetElStatus->isGood(trackpar->associatedSurface().associatedDetectorElement()->identifyHash())) ||
230 
231  if (m_checkDeadRegions) {
232 
233  double fracGood = getFracGood(
234  trackpar, m_phiRegionSize, m_etaRegionSize, !m_pixelDetElStatus.empty() ? pixelDetElStatus.cptr() : nullptr);
235  if (fracGood > m_goodFracCut && fracGood >= 0) {
236  ATH_MSG_DEBUG("Condition Summary: b-layer good");
237  expect_hit = true;
238  } else {
239  ATH_MSG_DEBUG("b-layer in dead region: fracGood = " << fracGood);
240  }
241 
242  } else {
243  ATH_MSG_DEBUG("Condition Summary: not checking dead regions");
244  expect_hit = true;
245  }
246 
247  } else {
248  ATH_MSG_DEBUG(__LINE__ << "b-layer not good");
249  }
250 
251  return expect_hit;
252 }

◆ expectHitInInnermostPixelLayer() [1/3]

bool InDet::IInDetTestPixelLayerTool::expectHitInInnermostPixelLayer ( const EventContext &  ctx,
const Trk::Track track 
) const
inlineinherited

Definition at line 49 of file IInDetTestPixelLayerTool.h.

51  {
52  return expectHitInPixelLayer(ctx, track, 0, true);
53  }

◆ expectHitInInnermostPixelLayer() [2/3]

bool InDet::IInDetTestPixelLayerTool::expectHitInInnermostPixelLayer ( const Trk::Track track) const
inlineinherited

Definition at line 54 of file IInDetTestPixelLayerTool.h.

55  {
57  Gaudi::Hive::currentContext(), track);
58  }

◆ expectHitInInnermostPixelLayer() [3/3]

bool InDet::IInDetTestPixelLayerTool::expectHitInInnermostPixelLayer ( const Trk::TrackParameters trackpar) const
inlineinherited

Definition at line 59 of file IInDetTestPixelLayerTool.h.

60  {
61  return expectHitInPixelLayer(
62  Gaudi::Hive::currentContext(), trackpar, 0, true);
63  }

◆ expectHitInNextToInnermostPixelLayer() [1/3]

bool InDet::IInDetTestPixelLayerTool::expectHitInNextToInnermostPixelLayer ( const EventContext &  ctx,
const Trk::Track track 
) const
inlineinherited

Definition at line 65 of file IInDetTestPixelLayerTool.h.

67  {
68  return expectHitInPixelLayer(ctx, track, 1, true);
69  }

◆ expectHitInNextToInnermostPixelLayer() [2/3]

bool InDet::IInDetTestPixelLayerTool::expectHitInNextToInnermostPixelLayer ( const Trk::Track track) const
inlineinherited

Definition at line 70 of file IInDetTestPixelLayerTool.h.

71  {
73  Gaudi::Hive::currentContext(), track);
74  }

◆ expectHitInNextToInnermostPixelLayer() [3/3]

bool InDet::IInDetTestPixelLayerTool::expectHitInNextToInnermostPixelLayer ( const Trk::TrackParameters trackpar) const
inlineinherited

Definition at line 75 of file IInDetTestPixelLayerTool.h.

76  {
77  return expectHitInPixelLayer(
78  Gaudi::Hive::currentContext(), trackpar, 1, true);
79  }

◆ expectHitInPixelLayer() [1/3]

bool InDet::InDetTestPixelLayerTool::expectHitInPixelLayer ( const EventContext &  ctx,
const Trk::Track track,
int  pixel_layer,
bool  checkBarrelOnly = false 
) const
finaloverridevirtual

Implements InDet::IInDetTestPixelLayerTool.

Definition at line 79 of file InDetTestPixelLayerTool.cxx.

83 {
84  ATH_MSG_DEBUG("computing expectHitInPixelLayer info");
85 
86  const Trk::Perigee* mp = track->perigeeParameters();
87 
88  if (!mp) {
89  ATH_MSG_WARNING("Found Track with no perigee parameters: no b-layer info "
90  "will be provided ");
91  return false;
92  } else {
93  ATH_MSG_DEBUG("Track perigee parameters");
94  return this->expectHitInPixelLayer(ctx, mp, pixel_layer, checkBarrelOnly);
95  }
96 }

◆ expectHitInPixelLayer() [2/3]

bool InDet::InDetTestPixelLayerTool::expectHitInPixelLayer ( const EventContext &  ctx,
const Trk::TrackParameters trackpar,
int  pixel_layer,
bool  checkBarrelOnly = false 
) const
finaloverridevirtual

will be set to true if at least one good module is passed

pass good module -> hit is expected on pixelLayer

check dead regions

pass good module -> hit is expected on pixelLayer

check active area (check edges)

pass good module -> hit is expected on pixelLayer

pixelLayer param

Implements InDet::IInDetTestPixelLayerTool.

Definition at line 131 of file InDetTestPixelLayerTool.cxx.

136 {
137  bool expect_hit = false;
138 
139  std::vector<std::unique_ptr<const Trk::TrackParameters>> pixelLayerParam;
140  if (!this->getPixelLayerParameters(ctx, trackpar, pixelLayerParam)) {
141  ATH_MSG_DEBUG("Failed to get pixel layer parameters!");
142  return false;
143  }
144 
146  for (std::unique_ptr<const Trk::TrackParameters>& p : pixelLayerParam) {
147 
148  if (!(p->associatedSurface().associatedDetectorElement()))
149  continue;
150  Identifier id =
151  p->associatedSurface().associatedDetectorElement()->identify();
152 
153  if (checkBarrelOnly && !m_pixelId->is_barrel(id)) continue;
154  if (m_pixelId->layer_disk(id) != pixel_layer) continue;
155 
157  pixelDetElStatus->isGood(p->associatedSurface().associatedDetectorElement()->identifyHash()),
159 
160  if ((!m_pixelDetElStatus.empty() &&
161  pixelDetElStatus->isGood(p->associatedSurface().associatedDetectorElement()->identifyHash())) ||
163 
164  if (m_checkActiveAreas) {
165 
166  if (isActive(p.get())) {
167 
168  if (m_checkDeadRegions) {
169 
170  double fracGood = getFracGood(p.get(),
173  !m_pixelDetElStatus.empty() ? pixelDetElStatus.cptr() : nullptr);
174  if (fracGood > m_goodFracCut && fracGood >= 0) {
175  ATH_MSG_DEBUG("Condition Summary: b-layer good");
176  expect_hit =
177  true;
178  } else {
179  ATH_MSG_DEBUG("b-layer in dead region: fracGood = " << fracGood);
180  }
181 
182  } else {
183  ATH_MSG_DEBUG("Condition Summary: not checking dead regions");
184  expect_hit =
185  true;
186  }
187 
188  } else {
190  "Condition Summary: b-layer good but outside active area");
191  }
192 
193  }
194  else {
196  "Condition Summary: b-layer good, active areas not checked");
197  expect_hit = true;
198  }
199 
200  } else {
201  ATH_MSG_DEBUG(__LINE__ << "b-layer not good");
202  }
203 
204  }
205 
206  return expect_hit;
207 }

◆ expectHitInPixelLayer() [3/3]

bool InDet::InDetTestPixelLayerTool::expectHitInPixelLayer ( const EventContext &  ctx,
const Trk::TrackParticleBase track,
int  pixel_layer 
) const
finaloverridevirtual

Implements InDet::IInDetTestPixelLayerTool.

Definition at line 99 of file InDetTestPixelLayerTool.cxx.

103 {
104 
105  // Need to compute if we do expect a B-layer hit. If the previous
106  // calculation already determined that we don't expect a hit, then we still
107  // won't expect one.
108 
109  if (!track) {
111  "Not a valid TrackParticle: no b-layer info will be provided");
112  return false;
113  }
114 
115  ATH_MSG_DEBUG("computing expectHitInPixelLayer info");
116 
117  const Trk::Perigee* mp = track->perigee();
118 
119  if (!mp) {
120  ATH_MSG_WARNING("Found TrackParticle with no perigee parameters: no "
121  "b-layer info will be provided");
122  return false;
123  } else {
124  ATH_MSG_DEBUG("TrackParticle perigee parameters");
125  // mp->dump(mLog);
126  return (this->expectHitInPixelLayer(ctx, mp, pixel_layer));
127  }
128 }

◆ 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

◆ getFracGood() [1/3]

double InDet::InDet::InDetTestPixelLayerTool::getFracGood ( const Trk::TrackParameters trackpar,
double  phiRegionSize,
double  etaRegionSize,
const InDet::SiDetectorElementStatus pixelDetElStatus 
) const
private

not exactly on the edge

not exactly on the edge

Definition at line 611 of file InDetTestPixelLayerTool.cxx.

616 {
617 
618  Identifier moduleid =
619  trkParam->associatedSurface().associatedDetectorElement()->identify();
620  IdentifierHash id_hash = m_pixelId->wafer_hash(moduleid);
621 
622  const EventContext& ctx = Gaudi::Hive::currentContext();
623  VALIDATE_STATUS_ARRAY(pixelDetElStatus,pixelDetElStatus->isGood(id_hash), m_pixelCondSummaryTool->isGood(id_hash, ctx));
624  bool is_good ( ( pixelDetElStatus && pixelDetElStatus->isGood(id_hash))
625  || (!pixelDetElStatus && m_pixelCondSummaryTool->isGood(id_hash, ctx)));
626  if (!is_good)
627  return 0.;
628 
629  const Amg::Vector2D& locPos = trkParam->localPosition();
630  double locx = locPos[Trk::locX];
631  double locy = locPos[Trk::locY];
632  double error_locx = -9999;
633  double error_locy = -9999;
634 
635  if (trkParam->covariance()) {
636  error_locx = sqrt((*trkParam->covariance())(Trk::locX, Trk::locX));
637  error_locy = sqrt((*trkParam->covariance())(Trk::locY, Trk::locY));
638  } else {
639  ATH_MSG_DEBUG("could not get MeasuredTrackParameters ");
640  }
641 
642  double phitol = 2.5;
643  double etatol = 5.;
644  if (trkParam->covariance()) {
645  phitol = phiRegionSize * error_locx;
646  etatol = etaRegionSize * error_locy;
647  }
648 
649  // now, check to see that phitol and etatol extend at least beyond the current
650  // pixel
651  const InDetDD::SiDetectorElement* sielem =
652  dynamic_cast<const InDetDD::SiDetectorElement*>(
653  trkParam->associatedSurface().associatedDetectorElement());
654 
655  if (!sielem) {
657  "Failed to cast TrackParameters associated surface to SiDetectorElement");
658  return false;
659  }
660 
661  const InDetDD::PixelModuleDesign* design =
662  dynamic_cast<const InDetDD::PixelModuleDesign*>(&sielem->design());
663  if (design) {
664  phitol = std::max(phitol, design->phiPitch() + 1e-6);
665  etatol = std::max(etatol, design->etaPitch() + 1e-6);
666  } else {
668  "could not get pixel module design, returning 0 for getFracGood");
669  return 0.;
670  }
671 
672  Amg::Vector2D LocPos(locx, locy);
673 
674  double startLocX = locx - phitol;
675  double startLocY = locy - etatol;
676 
677  double endLocX = locx + phitol;
678  double endLocY = locy + etatol;
679 
680  Amg::Vector2D startLocPostmp(startLocX, startLocY);
681  Amg::Vector2D endLocPostmp(endLocX, endLocY);
682 
683  double etaDist = -9999;
684  double phiDist = -9999;
685 
686  if (design) {
687  design->distanceToDetectorEdge(LocPos, etaDist, phiDist);
688  if (phiDist < 0)
689  locx += (std::abs(phiDist) + 1e-6);
690  if (etaDist < 0)
691  locy += (std::abs(etaDist) + 1e-6);
692  design->distanceToDetectorEdge(startLocPostmp, etaDist, phiDist);
693  if (phiDist < 0)
694  startLocX += (std::abs(phiDist) + 1e-6);
695  if (etaDist < 0)
696  startLocY += (std::abs(etaDist) + 1e-6);
697  design->distanceToDetectorEdge(endLocPostmp, etaDist, phiDist);
698  if (phiDist < 0)
699  endLocX -= (std::abs(phiDist) + 1e-6);
700  if (etaDist < 0)
701  endLocY -= (std::abs(etaDist) + 1e-6);
702  }
703 
704  LocPos = Amg::Vector2D(locx, locy);
705 
706  if (m_checkDisabledFEs) {
708  Identifier centreId = sielem->identifierOfPosition(LocPos);
709  if (centreId.is_valid()) {
710  Identifier moduleID = m_pixelId->wafer_id(centreId);
711  IdentifierHash id_hash = m_pixelId->wafer_hash(moduleID);
712 
714  pixelDetElStatus->isChipGood(id_hash, m_pixelReadout->getFE(centreId, moduleID)),
715  m_pixelCondSummaryTool->isGood(centreId, context));
716  bool is_chip_good((!m_pixelDetElStatus.empty() &&
717  pixelDetElStatus->isChipGood(id_hash, m_pixelReadout->getFE(centreId, moduleID))) ||
718  (m_pixelDetElStatus.empty() && m_pixelCondSummaryTool->isGood(centreId, context, ctx)));
719  if (!is_chip_good){
720  return 0.;
721  }
722  } else {
723  ATH_MSG_WARNING("Invalid Identifier, skipping check of FE...");
724  }
725  }
726 
727  Amg::Vector2D startLocPos(startLocX, startLocY);
728  Amg::Vector2D endLocPos(endLocX, endLocY);
729  Identifier startId = sielem->identifierOfPosition(startLocPos);
730  Identifier endId = sielem->identifierOfPosition(endLocPos);
731 
732  if (!startId.is_valid() || !endId.is_valid()) {
733  ATH_MSG_WARNING("unvalid identifier: locPos outside module! ");
734  return 0.;
735  }
736 
737  double frac =0.;
738 
739  if (pixelDetElStatus) {
740  frac = Pixel::getGoodFraction(*pixelDetElStatus, *m_pixelReadout, *m_pixelId, moduleid, id_hash, startId, endId);
742  !m_pixelDetElStatus.empty(), frac, m_pixelCondSummaryTool->goodFraction(id_hash, startId, endId, ctx));
743 
744  } else {
745  frac = m_pixelCondSummaryTool->goodFraction(id_hash, startId, endId, ctx);
746  }
747 
748  return frac;
749 }

◆ getFracGood() [2/3]

double InDet::InDetTestPixelLayerTool::getFracGood ( const Trk::TrackParameters trackpar,
int  pixel_layer 
) const
finaloverridevirtual

pixelLayer param

Implements InDet::IInDetTestPixelLayerTool.

Definition at line 271 of file InDetTestPixelLayerTool.cxx.

274 {
275  std::vector<std::unique_ptr<const Trk::TrackParameters>> pixelLayerParam;
276  if (!this->getPixelLayerParameters(trackpar, pixelLayerParam))
277  return -5.;
278 
279  // now, figure out which layer we're supposed to be checking.
280  bool found_layer = false;
281  for (std::unique_ptr<const Trk::TrackParameters>& p : pixelLayerParam) {
282  if (!(p->associatedSurface().associatedDetectorElement()))
283  continue;
284  Identifier id =
285  p->associatedSurface().associatedDetectorElement()->identify();
286 
287  if (m_pixelId->layer_disk(id) == pixel_layer){
288  found_layer = true;
289  break;
290  }
291  }
292 
293  // if we're asking for a layer that doesn't exist in the extrapolation, then
294  // return.
295  if (!found_layer)
296  return -7.;
297 
298  const EventContext& ctx = Gaudi::Hive::currentContext();
300 
301  for (std::unique_ptr<const Trk::TrackParameters>& p : pixelLayerParam) {
302 
303  if (!(p->associatedSurface().associatedDetectorElement()))
304  continue;
305  Identifier id =
306  p->associatedSurface().associatedDetectorElement()->identify();
307 
308  if (m_pixelId->layer_disk(id) != pixel_layer)
309  continue;
310 
313  pixelDetElStatus->isGood(trackpar->associatedSurface().associatedDetectorElement()->identifyHash()),
315  if ((!m_pixelDetElStatus.empty() &&
316  pixelDetElStatus->isGood(p->associatedSurface().associatedDetectorElement()->identifyHash())) ||
318 
319  if (isActive(p.get())) {
320 
321  return getFracGood(
322  p.get(), m_phiRegionSize, m_etaRegionSize, !m_pixelDetElStatus.empty() ? pixelDetElStatus.cptr() : nullptr);
323 
324  } else {
326  "Condition Summary: b-layer good but outside active area");
327  }
328 
329  } else {
330  ATH_MSG_DEBUG(__LINE__ << "b-layer not good");
331  }
332 
333  }
334 
335  return -3.;
336 }

◆ getFracGood() [3/3]

double InDet::InDet::InDetTestPixelLayerTool::getFracGood ( const Trk::TrackParticleBase trackpar,
int  pixel_layer 
) const
finaloverridevirtual

Implements InDet::IInDetTestPixelLayerTool.

Definition at line 255 of file InDetTestPixelLayerTool.cxx.

257 {
258  const Trk::Perigee* mp = track->perigee();
259 
260  if (!mp) {
261  ATH_MSG_WARNING("Found Track with no perigee parameters: no b-layer info "
262  "will be provided ");
263  return -4.;
264  } else {
265  ATH_MSG_DEBUG("Track perigee parameters");
266  return this->getFracGood(mp, pixel_layer);
267  }
268 }

◆ getPixelDetElStatus()

SG::ReadHandle< InDet::SiDetectorElementStatus > InDet::InDetTestPixelLayerTool::getPixelDetElStatus ( const EventContext &  ctx) const
private

Definition at line 159 of file InDetTestPixelLayerTool.h.

159  {
161  if (!m_pixelDetElStatus.empty()) {
163  if (!pixelDetElStatus.isValid()) {
164  std::stringstream msg;
165  msg << "Failed to get " << m_pixelDetElStatus.key() << " from StoreGate in " << name();
166  throw std::runtime_error(msg.str());
167  }
168  }
169  return pixelDetElStatus;
170 }

◆ getPixelLayerParameters() [1/2]

bool InDet::InDet::InDetTestPixelLayerTool::getPixelLayerParameters ( const EventContext &  ctx,
const Trk::TrackParameters trackpar,
std::vector< std::unique_ptr< const Trk::TrackParameters >> &  pixelLayerParam 
) const
private

all params

Definition at line 552 of file InDetTestPixelLayerTool.cxx.

557 {
559  ATH_MSG_DEBUG("Trying to extrapolate to pixelLayer");
560 
561  if(std::abs(trackpar->position().z())>10000.){
562  ATH_MSG_DEBUG("Pathological track parameter well outside of detector");
563  ATH_MSG_DEBUG("Propagator might have issue with this, discarding");
564  ATH_MSG_VERBOSE("dumping track parameters " << *trackpar);
565  return false;
566  }
567 
568  Amg::Transform3D surfTrans;
569  surfTrans.setIdentity();
570  Trk::CylinderSurface BiggerThanPixelLayerSurface(surfTrans, m_outerRadius, 10000.0);
571 
572  // extrapolate stepwise to this parameter (be careful, sorting might be wrong)
573  std::vector<std::unique_ptr<Trk::TrackParameters>> paramList =
574  m_extrapolator->extrapolateStepwise(
575  ctx, *trackpar, BiggerThanPixelLayerSurface, Trk::alongMomentum, false);
576 
577  if (paramList.empty()) {
578  ATH_MSG_DEBUG("No parameter returned by propagator ");
579  ATH_MSG_VERBOSE("dumping track parameters " << *trackpar);
580  return false;
581  }
582 
584  " Number of generated parameters by propagator: " << paramList.size());
585 
586  int s_int = 0;
587  for (std::unique_ptr<Trk::TrackParameters>& p : paramList) {
588  ATH_MSG_DEBUG(s_int++ << "th surface : ");
589 
590  Identifier id;
591  if (!(p->associatedSurface().associatedDetectorElement() != nullptr &&
592  p->associatedSurface().associatedDetectorElement()->identify() !=
593  0)) {
594  continue;
595  }
596 
597  id = p->associatedSurface().associatedDetectorElement()->identify();
598  if (!m_idHelper->is_pixel(id)) {
599  continue;
600  }
601 
602  ATH_MSG_DEBUG("Found pixel module : " << id.get_compact());
603 
604  pixelLayerParam.push_back(std::move(p));
605  }
606 
607  return true;
608 }

◆ getPixelLayerParameters() [2/2]

bool InDet::InDetTestPixelLayerTool::getPixelLayerParameters ( const Trk::TrackParameters trackpar,
std::vector< std::unique_ptr< const Trk::TrackParameters >> &  pixelLayerParam 
) const
inlineprivate

Definition at line 102 of file InDetTestPixelLayerTool.h.

106  {
108  Gaudi::Hive::currentContext(), trackpar, pixelLayerParam);
109  }

◆ getTrackStateOnInnermostPixelLayerInfo()

bool InDet::IInDetTestPixelLayerTool::getTrackStateOnInnermostPixelLayerInfo ( const Trk::TrackParameters trackpar,
std::vector< TrackStateOnPixelLayerInfo > &  infoList 
) const
inlineinherited

Definition at line 96 of file IInDetTestPixelLayerTool.h.

98  {
99  return getTrackStateOnPixelLayerInfo(trackpar, infoList, 0, true);
100  }

◆ getTrackStateOnPixelLayerInfo() [1/3]

bool InDet::InDet::InDetTestPixelLayerTool::getTrackStateOnPixelLayerInfo ( const Trk::Track track,
std::vector< TrackStateOnPixelLayerInfo > &  infoList 
) const
finaloverridevirtual

Implements InDet::IInDetTestPixelLayerTool.

Definition at line 379 of file InDetTestPixelLayerTool.cxx.

382 {
383 
384  std::unique_ptr<const Trk::TrackParameters> startParameters = nullptr;
385 
386  if (track->perigeeParameters()) {
387  startParameters = track->perigeeParameters()->uniqueClone();
388  } else if (track->trackParameters()->front()) {
389  startParameters =
390  m_extrapolator->extrapolate(
391  Gaudi::Hive::currentContext(),
392  *(track->trackParameters()->front()),
395  false);
396  }
397 
398  if (!startParameters) {
399  ATH_MSG_WARNING("Found Track with no perigee parameters: no b-layer info "
400  "will be provided");
401  return false;
402  }
403 
404  bool succeed = getTrackStateOnPixelLayerInfo(startParameters.get(), infoList);
405  return succeed;
406 }

◆ getTrackStateOnPixelLayerInfo() [2/3]

bool InDet::InDetTestPixelLayerTool::getTrackStateOnPixelLayerInfo ( const Trk::TrackParameters trackpar,
std::vector< TrackStateOnPixelLayerInfo > &  infoList,
int  pixel_layer = -1,
bool  checkBarrelOnly = false 
) const
finaloverridevirtual

pixelLayer param

Implements InDet::IInDetTestPixelLayerTool.

Definition at line 426 of file InDetTestPixelLayerTool.cxx.

431 {
432 
433  infoList.clear();
434 
435  std::vector<std::unique_ptr<const Trk::TrackParameters>> pixelLayerParam;
436  if (!getPixelLayerParameters(trackpar, pixelLayerParam))
437  return false;
438 
439  const EventContext& ctx = Gaudi::Hive::currentContext();
441 
442  for (std::unique_ptr<const Trk::TrackParameters>& trkParam :
443  pixelLayerParam) {
444  TrackStateOnPixelLayerInfo pixelLayerInfo;
445 
446  double fracGood = getFracGood(trkParam.get(),
449  !m_pixelDetElStatus.empty() ? pixelDetElStatus.cptr() : nullptr);
450  pixelLayerInfo.goodFraction(fracGood);
451 
452  Identifier id =
453  trkParam->associatedSurface().associatedDetectorElement()->identify();
454  pixelLayerInfo.moduleId(id);
455 
456  if (checkBarrelOnly && !m_pixelId->is_barrel(id)) continue;
457  if (m_pixelId->layer_disk(id) != pixel_layer) continue;
458 
459  const InDetDD::SiDetectorElement* sielem =
460  dynamic_cast<const InDetDD::SiDetectorElement*>(
461  trkParam->associatedSurface().associatedDetectorElement());
462 
463  if (!sielem) {
464  ATH_MSG_WARNING("Failed to cast TrackParameters associated surface to "
465  "SiDetectorElement");
466  return false;
467  }
468 
469  const Amg::Vector2D& locPos = trkParam->localPosition();
470  Identifier holeId_c = sielem->identifierOfPosition(locPos);
471  pixelLayerInfo.pixelId(holeId_c);
472 
473  double etaDist = -9999;
474  double phiDist = -9999;
475  const InDetDD::PixelModuleDesign* design =
476  dynamic_cast<const InDetDD::PixelModuleDesign*>(&sielem->design());
477  if (design) {
478  design->distanceToDetectorEdge(
479  locPos,
480  etaDist,
481  phiDist);
482  } else {
483  ATH_MSG_WARNING("could not get pixel module design for "
484  << m_idHelper->show_to_string(id)
485  << ", returning false for getTrackStateOnPixelLayerInfo");
486  return false;
487  }
488  pixelLayerInfo.distToModuleEdgePhi(phiDist);
489  pixelLayerInfo.distToModuleEdgeEta(etaDist);
490 
491  pixelLayerInfo.globalPosition(trkParam->position());
492 
493  pixelLayerInfo.localX(locPos[Trk::locX]);
494  pixelLayerInfo.localY(locPos[Trk::locY]);
495 
496  pixelLayerInfo.theta(trkParam->parameters()[Trk::theta]);
497  pixelLayerInfo.phi(trkParam->parameters()[Trk::phi0]);
498 
499  float error_locx = -9999;
500  float error_locy = -9999;
501 
502  if (trkParam->covariance()) {
503  error_locx = sqrt((*trkParam->covariance())(Trk::locX, Trk::locX));
504  error_locy = sqrt((*trkParam->covariance())(Trk::locY, Trk::locY));
505  } else {
506  ATH_MSG_DEBUG("could not TrackParameters for hole "
507  << m_idHelper->show_to_string(id));
508  }
509 
510  pixelLayerInfo.errLocalX(error_locx);
511  pixelLayerInfo.errLocalY(error_locy);
512 
515  pixelDetElStatus->isGood(trkParam->associatedSurface().associatedDetectorElement()->identifyHash()),
517  bool isgood =
518  ((!m_pixelDetElStatus.empty() &&
519  pixelDetElStatus->isGood(trkParam->associatedSurface().associatedDetectorElement()->identifyHash())) ||
521 
522  double phitol = 2.5;
523  double etatol = 5.;
524 
525  if (trkParam->covariance()) {
526  phitol = 3 * sqrt((*trkParam->covariance())(Trk::locX, Trk::locX));
527  etatol = 3 * sqrt((*trkParam->covariance())(Trk::locY, Trk::locY));
528  }
529 
530  InDetDD::SiIntersect siIn = sielem->inDetector(locPos, phitol, etatol);
531  bool isIn = siIn.in();
532 
533  if (isgood) {
534  if (isIn)
535  pixelLayerInfo.type(insideGoodModule);
536  else
537  pixelLayerInfo.type(nearGoodModuleEdge);
538  } else {
539  if (isIn)
540  pixelLayerInfo.type(insideBadModule);
541  else
542  pixelLayerInfo.type(nearBadModuleEdge);
543  }
544 
545  infoList.push_back(pixelLayerInfo);
546  }
547 
548  return true;
549 }

◆ getTrackStateOnPixelLayerInfo() [3/3]

bool InDet::InDetTestPixelLayerTool::getTrackStateOnPixelLayerInfo ( const Trk::TrackParticleBase track,
std::vector< TrackStateOnPixelLayerInfo > &  infoList 
) const
finaloverridevirtual

Implements InDet::IInDetTestPixelLayerTool.

Definition at line 409 of file InDetTestPixelLayerTool.cxx.

412 {
413 
414  const Trk::Perigee* startParameters = track->perigee();
415 
416  if (!startParameters) {
417  ATH_MSG_WARNING("Found TrackParticle with no perigee parameters: no "
418  "b-layer info will be provided");
419  return false;
420  }
421 
422  return getTrackStateOnPixelLayerInfo(startParameters, infoList);
423 }

◆ initialize()

StatusCode InDet::InDetTestPixelLayerTool::initialize ( )
finaloverridevirtual

Definition at line 48 of file InDetTestPixelLayerTool.cxx.

49 {
50 
51  // retrieve ID helpers:
52  if (detStore()->retrieve(m_idHelper, "AtlasID").isFailure()) {
53  ATH_MSG_FATAL("Could not get AtlasDetectorID helper");
54  return StatusCode::FAILURE;
55  }
56 
57  if (detStore()->retrieve(m_pixelId, "PixelID").isFailure()) {
58  ATH_MSG_FATAL("Could not get PixelID helper !");
59  return StatusCode::FAILURE;
60  }
61 
62  if (m_extrapolator.retrieve().isFailure()) {
63  ATH_MSG_FATAL("Failed to retrieve tool " << m_extrapolator);
64  return StatusCode::FAILURE;
65  }
66  ATH_MSG_DEBUG("Retrieved tool " << m_extrapolator);
67 
68  ATH_CHECK(m_pixelCondSummaryTool.retrieve(DisableTool{
69  !m_pixelDetElStatus.empty() && !VALIDATE_STATUS_ARRAY_ACTIVATED }));
71  if (!m_pixelDetElStatus.empty()) {
72  ATH_CHECK(m_pixelReadout.retrieve());
73  }
74 
75  return StatusCode::SUCCESS;
76 }

◆ 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& InDet::IInDetTestPixelLayerTool::interfaceID ( )
inlinestaticinherited

Definition at line 32 of file IInDetTestPixelLayerTool.h.

33  {
34  return IID_IInDetTestPixelLayerTool;
35  };

◆ isActive()

bool InDet::InDet::InDetTestPixelLayerTool::isActive ( const Trk::TrackParameters trackpar) const
private

checking active material

Definition at line 339 of file InDetTestPixelLayerTool.cxx.

341 {
342 
343  const InDetDD::SiDetectorElement* siElement =
344  dynamic_cast<const InDetDD::SiDetectorElement*>(
346  if (siElement == nullptr) {
347  // ------- in dubio pro reo --> return false (is assumed insensitive)
348  ATH_MSG_DEBUG("TrackParameters do not belong to a Si Element");
350  } else {
351  double phitol = 2.5;
352  double etatol = 5.;
353  if (trackpar->covariance()) {
354  phitol = 3. * sqrt((*trackpar->covariance())(Trk::locX, Trk::locX));
355  etatol = 3. * sqrt((*trackpar->covariance())(Trk::locY, Trk::locY));
356  }
357  InDetDD::SiIntersect siIn =
358  siElement->inDetector(trackpar->localPosition(), phitol, etatol);
359  if (siElement->nearBondGap(trackpar->localPosition(), etatol)) {
360  if (msgLvl(MSG::DEBUG)) {
361  msg(MSG::DEBUG) << "---> extrapolation on bond gap within " << etatol
362  << ", return" << endmsg;
363  }
364  } else if (!siIn.in()) {
365  if (msgLvl(MSG::DEBUG)) {
366  msg(MSG::DEBUG)
367  << "---> extrapolation not inside (active?) detector within "
368  << phitol << " " << etatol << ", return" << endmsg;
369  }
370  } else {
371  return true;
372  }
373  }
374 
375  return false;
376 }

◆ 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_checkActiveAreas

bool InDet::InDetTestPixelLayerTool::m_checkActiveAreas
private

Definition at line 149 of file InDetTestPixelLayerTool.h.

◆ m_checkDeadRegions

bool InDet::InDetTestPixelLayerTool::m_checkDeadRegions
private

Definition at line 150 of file InDetTestPixelLayerTool.h.

◆ m_checkDisabledFEs

bool InDet::InDetTestPixelLayerTool::m_checkDisabledFEs
private

Definition at line 151 of file InDetTestPixelLayerTool.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_etaRegionSize

double InDet::InDetTestPixelLayerTool::m_etaRegionSize
private

Definition at line 153 of file InDetTestPixelLayerTool.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_extrapolator

ToolHandle<Trk::IExtrapolator> InDet::InDetTestPixelLayerTool::m_extrapolator
private
Initial value:
{
this,
"Extrapolator",
"Trk::Extrapolator/InDetExtrapolator",
"Extrapolator used to extrapolate to layers"
}

Pointer to Extrapolator AlgTool.

Definition at line 119 of file InDetTestPixelLayerTool.h.

◆ m_goodFracCut

double InDet::InDetTestPixelLayerTool::m_goodFracCut
private

Definition at line 154 of file InDetTestPixelLayerTool.h.

◆ m_idHelper

const AtlasDetectorID* InDet::InDetTestPixelLayerTool::m_idHelper
private

detector helper

Definition at line 144 of file InDetTestPixelLayerTool.h.

◆ m_outerRadius

double InDet::InDetTestPixelLayerTool::m_outerRadius
private

Definition at line 155 of file InDetTestPixelLayerTool.h.

◆ m_phiRegionSize

double InDet::InDetTestPixelLayerTool::m_phiRegionSize
private

Definition at line 152 of file InDetTestPixelLayerTool.h.

◆ m_pixelCondSummaryTool

ToolHandle<IInDetConditionsTool> InDet::InDetTestPixelLayerTool::m_pixelCondSummaryTool
private
Initial value:
{
this,
"PixelSummaryTool",
"PixelConditionsSummaryTool/InDetPixelConditionsSummaryTool",
"Tool to retrieve Pixel Conditions summary"
}

Handles to IConditionsSummaryServices for Pixels.

Definition at line 127 of file InDetTestPixelLayerTool.h.

◆ m_pixelDetElStatus

SG::ReadHandleKey<InDet::SiDetectorElementStatus> InDet::InDetTestPixelLayerTool::m_pixelDetElStatus {this, "PixelDetElStatus", "", "Key of SiDetectorElementStatus for Pixel"}
private

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

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

Definition at line 137 of file InDetTestPixelLayerTool.h.

◆ m_pixelId

const PixelID* InDet::InDetTestPixelLayerTool::m_pixelId
private

ID pixel helper.

Definition at line 147 of file InDetTestPixelLayerTool.h.

◆ m_pixelReadout

ServiceHandle<InDetDD::IPixelReadoutManager> InDet::InDetTestPixelLayerTool::m_pixelReadout {this, "PixelReadoutManager", "PixelReadoutManager", "Pixel readout manager" }
private

Definition at line 140 of file InDetTestPixelLayerTool.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:
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
InDet::IInDetTestPixelLayerTool::expectHitInInnermostPixelLayer
bool expectHitInInnermostPixelLayer(const EventContext &ctx, const Trk::Track *track) const
Definition: IInDetTestPixelLayerTool.h:49
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
Trk::anyDirection
@ anyDirection
Definition: PropDirection.h:22
InDet::InDetTestPixelLayerTool::m_pixelId
const PixelID * m_pixelId
ID pixel helper.
Definition: InDetTestPixelLayerTool.h:147
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
Trk::Surface::associatedDetectorElement
const TrkDetElementBase * associatedDetectorElement() const
return associated Detector Element
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
max
#define max(a, b)
Definition: cfImp.cxx:41
Trk::locX
@ locX
Definition: ParamDefs.h:43
InDetDD::PixelModuleDesign
Definition: PixelModuleDesign.h:48
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:44
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::PerigeeSurface
Definition: PerigeeSurface.h:43
InDet::SiDetectorElementStatus::isChipGood
bool isChipGood(IdentifierHash hash, unsigned int chip) const
Definition: SiDetectorElementStatus.h:100
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
Trk::ParametersBase::associatedSurface
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
InDet::InDetTestPixelLayerTool::getPixelLayerParameters
bool getPixelLayerParameters(const EventContext &ctx, const Trk::TrackParameters *trackpar, std::vector< std::unique_ptr< const Trk::TrackParameters >> &pixelLayerParam) const
Definition: InDetTestPixelLayerTool.cxx:552
InDet::InDetTestPixelLayerTool::m_checkActiveAreas
bool m_checkActiveAreas
Definition: InDetTestPixelLayerTool.h:149
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
InDet::InDetTestPixelLayerTool::getPixelDetElStatus
SG::ReadHandle< InDet::SiDetectorElementStatus > getPixelDetElStatus(const EventContext &ctx) const
Definition: InDetTestPixelLayerTool.h:159
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
InDetConditions::PIXEL_CHIP
@ PIXEL_CHIP
Definition: InDetHierarchy.h:15
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
Trk::alongMomentum
@ alongMomentum
Definition: PropDirection.h:20
InDetConditions::Hierarchy
Hierarchy
Definition: InDetHierarchy.h:14
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::TrkDetElementBase::identify
virtual Identifier identify() const =0
Identifier.
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
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
Identifier::is_valid
bool is_valid() const
Check if id is in a valid state.
InDet::InDetTestPixelLayerTool::m_pixelCondSummaryTool
ToolHandle< IInDetConditionsTool > m_pixelCondSummaryTool
Handles to IConditionsSummaryServices for Pixels.
Definition: InDetTestPixelLayerTool.h:127
PixelID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition: PixelID.h:364
InDetDD::PixelModuleDesign::etaPitch
virtual double etaPitch() const
Pitch in eta direction.
Definition: PixelModuleDesign.cxx:173
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
InDet::InDetTestPixelLayerTool::getTrackStateOnPixelLayerInfo
virtual bool getTrackStateOnPixelLayerInfo(const Trk::TrackParticleBase *, std::vector< TrackStateOnPixelLayerInfo > &infoList) const override final
Definition: InDetTestPixelLayerTool.cxx:409
InDetDD::SiIntersect::in
bool in() const
Definition: SiIntersect.h:50
InDetDD::PixelModuleDesign::phiPitch
virtual double phiPitch() const
Pitch in phi direction.
Definition: PixelModuleDesign.cxx:157
InDet::InDetTestPixelLayerTool::getFracGood
virtual double getFracGood(const Trk::TrackParticleBase *trackpar, int pixel_layer) const override final
Definition: InDetTestPixelLayerTool.cxx:255
PixelID::is_barrel
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be pixel id, otherwise answer is not accurate. Use SiliconID for g...
Definition: PixelID.h:605
PixelID::wafer_hash
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Definition: PixelID.h:387
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
InDet::IInDetTestPixelLayerTool::expectHitInPixelLayer
virtual bool expectHitInPixelLayer(const EventContext &ctx, const Trk::TrackParticleBase *, int pixel_layer) const =0
InDet::InDetTestPixelLayerTool::m_checkDeadRegions
bool m_checkDeadRegions
Definition: InDetTestPixelLayerTool.h:150
InDet::insideBadModule
@ insideBadModule
Definition: TrackStateOnPixelLayerInfo.h:15
VALIDATE_STATUS_ARRAY
#define VALIDATE_STATUS_ARRAY(use_info, info_val, summary_val)
Definition: SiDetectorElementStatus.h:51
InDet::IInDetTestPixelLayerTool::getTrackStateOnPixelLayerInfo
virtual bool getTrackStateOnPixelLayerInfo(const Trk::TrackParticleBase *, std::vector< TrackStateOnPixelLayerInfo > &infoList) const =0
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
beamspotman.n
n
Definition: beamspotman.py:731
Trk::theta
@ theta
Definition: ParamDefs.h:72
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
checkxAOD.frac
frac
Definition: Tools/PyUtils/bin/checkxAOD.py:256
Trk::CylinderSurface
Definition: CylinderSurface.h:55
InDetDD::PixelModuleDesign::distanceToDetectorEdge
virtual void distanceToDetectorEdge(const SiLocalPosition &localPosition, double &etaDist, double &phiDist) const
Returns distance to nearest detector active edge +ve = inside -ve = outside.
Definition: PixelModuleDesign.cxx:61
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
InDetConditions::PIXEL_MODULE
@ PIXEL_MODULE
Definition: InDetHierarchy.h:15
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::InDetTestPixelLayerTool::expectHitInPixelLayer
virtual bool expectHitInPixelLayer(const EventContext &ctx, const Trk::TrackParticleBase *, int pixel_layer) const override final
Definition: InDetTestPixelLayerTool.cxx:99
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
InDet::InDetTestPixelLayerTool::m_goodFracCut
double m_goodFracCut
Definition: InDetTestPixelLayerTool.h:154
InDet::InDetTestPixelLayerTool::m_pixelDetElStatus
SG::ReadHandleKey< InDet::SiDetectorElementStatus > m_pixelDetElStatus
Optional read handle to get status data to test whether a pixel detector element is good.
Definition: InDetTestPixelLayerTool.h:138
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
Trk::ParametersCommon::localPosition
Amg::Vector2D localPosition() const
Access method for the local coordinates, local parameter definitions differ for each surface type.
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:626
InDet::SiDetectorElementStatus::isGood
bool isGood(IdentifierHash hash) const
Definition: SiDetectorElementStatus.h:97
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:191
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
InDet::InDetTestPixelLayerTool::m_pixelReadout
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
Definition: InDetTestPixelLayerTool.h:141
InDet::InDetTestPixelLayerTool::m_idHelper
const AtlasDetectorID * m_idHelper
detector helper
Definition: InDetTestPixelLayerTool.h:144
InDet::nearBadModuleEdge
@ nearBadModuleEdge
Definition: TrackStateOnPixelLayerInfo.h:16
InDetDD::SiIntersect
Definition: SiIntersect.h:23
InDet::InDetTestPixelLayerTool::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Pointer to Extrapolator AlgTool.
Definition: InDetTestPixelLayerTool.h:119
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
a
TList * a
Definition: liststreamerinfos.cxx:10
h
AtlasDetectorID::show_to_string
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:574
InDet::InDetTestPixelLayerTool::m_checkDisabledFEs
bool m_checkDisabledFEs
Definition: InDetTestPixelLayerTool.h:151
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
InDet::InDetTestPixelLayerTool::m_etaRegionSize
double m_etaRegionSize
Definition: InDetTestPixelLayerTool.h:153
InDet::InDetTestPixelLayerTool::isActive
bool isActive(const Trk::TrackParameters *trackpar) const
Definition: InDetTestPixelLayerTool.cxx:339
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
Trk::TrkDetElementBase::identifyHash
virtual IdentifierHash identifyHash() const =0
Identifier hash.
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
InDetDD::SiDetectorElement::nearBondGap
bool nearBondGap(const Amg::Vector2D &localPosition, double etaTol) const
Test if near bond gap within tolerances.
Definition: SiDetectorElement.cxx:323
InDet::insideGoodModule
@ insideGoodModule
Definition: TrackStateOnPixelLayerInfo.h:13
IdentifierHash
Definition: IdentifierHash.h:38
InDetDD::SiDetectorElement::design
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Trk::phi0
@ phi0
Definition: ParamDefs.h:71
InDet::nearGoodModuleEdge
@ nearGoodModuleEdge
Definition: TrackStateOnPixelLayerInfo.h:14
InDet::InDetTestPixelLayerTool::m_phiRegionSize
double m_phiRegionSize
Definition: InDetTestPixelLayerTool.h:152
fitman.k
k
Definition: fitman.py:528
Pixel::getGoodFraction
double getGoodFraction(const InDet::SiDetectorElementStatus &pixelDetElStatus, const InDetDD::IPixelReadoutManager &pixelReadout, const PixelID &pixelID, const Identifier &moduleId, const IdentifierHash &moudlIdHash, const Identifier &startId, const Identifier &endId)
Get The fraction of good chips the pixel of a pixel array is connected to.
Definition: PixelFEUtils.h:33
InDet::InDetTestPixelLayerTool::m_outerRadius
double m_outerRadius
Definition: InDetTestPixelLayerTool.h:155