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...
 
BooleanProperty m_checkActiveAreas {this, "CheckActiveAreas", false}
 
BooleanProperty m_checkDeadRegions {this, "CheckDeadRegions", false}
 
BooleanProperty m_checkDisabledFEs {this, "CheckDisabledFEs", false}
 
DoubleProperty m_phiRegionSize {this, "PhiRegionSize", 3.}
 
DoubleProperty m_etaRegionSize {this, "EtaRegionSize", 3.}
 
DoubleProperty m_goodFracCut {this, "GoodFracCut", 0.5}
 
DoubleProperty m_outerRadius {this, "OuterRadius", 230.}
 
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 }

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 202 of file InDetTestPixelLayerTool.cxx.

204 {
205  bool expect_hit =
206  false;
207 
208  Identifier id =
210 
211 
212  const EventContext& ctx = Gaudi::Hive::currentContext();
214 
217  pixelDetElStatus->isGood(trackpar->associatedSurface().associatedDetectorElement()->identifyHash()),
219  if ((!m_pixelDetElStatus.empty() &&
220  pixelDetElStatus->isGood(trackpar->associatedSurface().associatedDetectorElement()->identifyHash())) ||
222 
223  if (m_checkDeadRegions) {
224 
225  double fracGood = getFracGood(
226  trackpar, m_phiRegionSize, m_etaRegionSize, !m_pixelDetElStatus.empty() ? pixelDetElStatus.cptr() : nullptr);
227  if (fracGood > m_goodFracCut && fracGood >= 0) {
228  ATH_MSG_DEBUG("Condition Summary: b-layer good");
229  expect_hit = true;
230  } else {
231  ATH_MSG_DEBUG("b-layer in dead region: fracGood = " << fracGood);
232  }
233 
234  } else {
235  ATH_MSG_DEBUG("Condition Summary: not checking dead regions");
236  expect_hit = true;
237  }
238 
239  } else {
240  ATH_MSG_DEBUG(__LINE__ << "b-layer not good");
241  }
242 
243  return expect_hit;
244 }

◆ 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 71 of file InDetTestPixelLayerTool.cxx.

75 {
76  ATH_MSG_DEBUG("computing expectHitInPixelLayer info");
77 
78  const Trk::Perigee* mp = track->perigeeParameters();
79 
80  if (!mp) {
81  ATH_MSG_WARNING("Found Track with no perigee parameters: no b-layer info "
82  "will be provided ");
83  return false;
84  } else {
85  ATH_MSG_DEBUG("Track perigee parameters");
86  return this->expectHitInPixelLayer(ctx, mp, pixel_layer, checkBarrelOnly);
87  }
88 }

◆ 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 123 of file InDetTestPixelLayerTool.cxx.

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

◆ 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 91 of file InDetTestPixelLayerTool.cxx.

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

◆ 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 603 of file InDetTestPixelLayerTool.cxx.

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

◆ getFracGood() [2/3]

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

pixelLayer param

Implements InDet::IInDetTestPixelLayerTool.

Definition at line 263 of file InDetTestPixelLayerTool.cxx.

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

◆ getFracGood() [3/3]

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

Implements InDet::IInDetTestPixelLayerTool.

Definition at line 247 of file InDetTestPixelLayerTool.cxx.

249 {
250  const Trk::Perigee* mp = track->perigee();
251 
252  if (!mp) {
253  ATH_MSG_WARNING("Found Track with no perigee parameters: no b-layer info "
254  "will be provided ");
255  return -4.;
256  } else {
257  ATH_MSG_DEBUG("Track perigee parameters");
258  return this->getFracGood(mp, pixel_layer);
259  }
260 }

◆ 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 544 of file InDetTestPixelLayerTool.cxx.

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

◆ 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 369 of file InDetTestPixelLayerTool.cxx.

372 {
373 
374  std::unique_ptr<const Trk::TrackParameters> startParameters = nullptr;
375 
376  if (track->perigeeParameters()) {
377  startParameters = track->perigeeParameters()->uniqueClone();
378  } else if (track->trackParameters()->front()) {
379  startParameters =
380  m_extrapolator->extrapolate(
381  Gaudi::Hive::currentContext(),
382  *(track->trackParameters()->front()),
385  false);
386  }
387 
388  if (!startParameters) {
389  ATH_MSG_WARNING("Found Track with no perigee parameters: no b-layer info "
390  "will be provided");
391  return false;
392  }
393 
394  bool succeed = getTrackStateOnPixelLayerInfo(startParameters.get(), infoList);
395  return succeed;
396 }

◆ 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 416 of file InDetTestPixelLayerTool.cxx.

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

◆ getTrackStateOnPixelLayerInfo() [3/3]

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

Implements InDet::IInDetTestPixelLayerTool.

Definition at line 399 of file InDetTestPixelLayerTool.cxx.

402 {
403 
404  const Trk::Perigee* startParameters = track->perigee();
405 
406  if (!startParameters) {
407  ATH_MSG_WARNING("Found TrackParticle with no perigee parameters: no "
408  "b-layer info will be provided");
409  return false;
410  }
411 
412  return getTrackStateOnPixelLayerInfo(startParameters, infoList);
413 }

◆ initialize()

StatusCode InDet::InDetTestPixelLayerTool::initialize ( )
finaloverridevirtual

Definition at line 41 of file InDetTestPixelLayerTool.cxx.

42 {
43 
44  // retrieve ID helpers:
45  if (detStore()->retrieve(m_idHelper, "AtlasID").isFailure()) {
46  ATH_MSG_FATAL("Could not get AtlasDetectorID helper");
47  return StatusCode::FAILURE;
48  }
49 
50  if (detStore()->retrieve(m_pixelId, "PixelID").isFailure()) {
51  ATH_MSG_FATAL("Could not get PixelID helper !");
52  return StatusCode::FAILURE;
53  }
54 
55  if (m_extrapolator.retrieve().isFailure()) {
56  ATH_MSG_FATAL("Failed to retrieve tool " << m_extrapolator);
57  return StatusCode::FAILURE;
58  }
59 
60  ATH_CHECK(m_pixelCondSummaryTool.retrieve(DisableTool{
61  !m_pixelDetElStatus.empty() && !VALIDATE_STATUS_ARRAY_ACTIVATED }));
63  if (!m_pixelDetElStatus.empty()) {
64  ATH_CHECK(m_pixelReadout.retrieve());
65  }
66 
67  return StatusCode::SUCCESS;
68 }

◆ 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 331 of file InDetTestPixelLayerTool.cxx.

333 {
334 
335  const auto* tmp = trackpar->associatedSurface().associatedDetectorElement();
336  const InDetDD::SiDetectorElement* siElement =
337  (tmp != nullptr && tmp->detectorType() == Trk::DetectorElemType::Silicon)
338  ? static_cast<const InDetDD::SiDetectorElement*>(tmp)
339  : nullptr;
340 
341  if (siElement == nullptr) {
342  // ------- in dubio pro reo --> return false (is assumed insensitive)
343  ATH_MSG_DEBUG("TrackParameters do not belong to a Si Element");
345  } else {
346  double phitol = 2.5;
347  double etatol = 5.;
348  if (trackpar->covariance()) {
349  phitol = 3. * sqrt((*trackpar->covariance())(Trk::locX, Trk::locX));
350  etatol = 3. * sqrt((*trackpar->covariance())(Trk::locY, Trk::locY));
351  }
352  InDetDD::SiIntersect siIn =
353  siElement->inDetector(trackpar->localPosition(), phitol, etatol);
354  if (siElement->nearBondGap(trackpar->localPosition(), etatol)) {
355  ATH_MSG_DEBUG("---> extrapolation on bond gap within " << etatol
356  << ", return");
357  } else if (!siIn.in()) {
358  ATH_MSG_DEBUG("---> extrapolation not inside (active?) detector within "
359  << phitol << " " << etatol << ", return");
360  } else {
361  return true;
362  }
363  }
364 
365  return false;
366 }

◆ 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

BooleanProperty InDet::InDetTestPixelLayerTool::m_checkActiveAreas {this, "CheckActiveAreas", false}
private

Definition at line 149 of file InDetTestPixelLayerTool.h.

◆ m_checkDeadRegions

BooleanProperty InDet::InDetTestPixelLayerTool::m_checkDeadRegions {this, "CheckDeadRegions", false}
private

Definition at line 150 of file InDetTestPixelLayerTool.h.

◆ m_checkDisabledFEs

BooleanProperty InDet::InDetTestPixelLayerTool::m_checkDisabledFEs {this, "CheckDisabledFEs", false}
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

DoubleProperty InDet::InDetTestPixelLayerTool::m_etaRegionSize {this, "EtaRegionSize", 3.}
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

DoubleProperty InDet::InDetTestPixelLayerTool::m_goodFracCut {this, "GoodFracCut", 0.5}
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

DoubleProperty InDet::InDetTestPixelLayerTool::m_outerRadius {this, "OuterRadius", 230.}
private

Definition at line 155 of file InDetTestPixelLayerTool.h.

◆ m_phiRegionSize

DoubleProperty InDet::InDetTestPixelLayerTool::m_phiRegionSize {this, "PhiRegionSize", 3.}
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
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
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
InDet::InDetTestPixelLayerTool::m_goodFracCut
DoubleProperty m_goodFracCut
Definition: InDetTestPixelLayerTool.h:154
Trk::locX
@ locX
Definition: ParamDefs.h:37
InDetDD::PixelModuleDesign
Definition: PixelModuleDesign.h:48
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:38
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::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
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:544
InDet::InDetTestPixelLayerTool::m_checkDeadRegions
BooleanProperty m_checkDeadRegions
Definition: InDetTestPixelLayerTool.h:150
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
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
InDet::InDetTestPixelLayerTool::m_etaRegionSize
DoubleProperty m_etaRegionSize
Definition: InDetTestPixelLayerTool.h:153
InDetDD::PixelModuleDesign::etaPitch
virtual double etaPitch() const
Pitch in eta direction.
Definition: PixelModuleDesign.cxx:196
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
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
InDet::InDetTestPixelLayerTool::getTrackStateOnPixelLayerInfo
virtual bool getTrackStateOnPixelLayerInfo(const Trk::TrackParticleBase *, std::vector< TrackStateOnPixelLayerInfo > &infoList) const override final
Definition: InDetTestPixelLayerTool.cxx:399
InDet::InDetTestPixelLayerTool::m_checkDisabledFEs
BooleanProperty m_checkDisabledFEs
Definition: InDetTestPixelLayerTool.h:151
InDetDD::SiIntersect::in
bool in() const
Definition: SiIntersect.h:50
InDetDD::PixelModuleDesign::phiPitch
virtual double phiPitch() const
Pitch in phi direction.
Definition: PixelModuleDesign.cxx:180
Trk::DetectorElemType::Silicon
@ Silicon
InDet::InDetTestPixelLayerTool::m_phiRegionSize
DoubleProperty m_phiRegionSize
Definition: InDetTestPixelLayerTool.h:152
InDet::InDetTestPixelLayerTool::getFracGood
virtual double getFracGood(const Trk::TrackParticleBase *trackpar, int pixel_layer) const override final
Definition: InDetTestPixelLayerTool.cxx:247
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
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
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::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
beamspotman.n
n
Definition: beamspotman.py:731
Trk::theta
@ theta
Definition: ParamDefs.h:66
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
checkxAOD.frac
frac
Definition: Tools/PyUtils/bin/checkxAOD.py:259
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:84
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:91
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
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:227
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
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
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
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
InDet::InDetTestPixelLayerTool::m_checkActiveAreas
BooleanProperty m_checkActiveAreas
Definition: InDetTestPixelLayerTool.h:149
InDet::InDetTestPixelLayerTool::isActive
bool isActive(const Trk::TrackParameters *trackpar) const
Definition: InDetTestPixelLayerTool.cxx:331
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
InDet::InDetTestPixelLayerTool::m_outerRadius
DoubleProperty m_outerRadius
Definition: InDetTestPixelLayerTool.h:155
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
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
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
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:65
InDet::nearGoodModuleEdge
@ nearGoodModuleEdge
Definition: TrackStateOnPixelLayerInfo.h:14
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
Identifier
Definition: IdentifierFieldParser.cxx:14