ATLAS Offline Software
ExpectedHitUtils.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
10 
11 #include "ExpectedHitUtils.h"
12 
13 namespace ActsTrk {
14  std::array<unsigned int,4> expectedLayerPattern(const EventContext& ctx,
15  const IActsExtrapolationTool &extrapolator,
16  Acts::BoundTrackParameters perigee_parameters,
17  const Acts::CylinderSurface &extrapolation_volume) {
18 
20  perigee_parameters,
21  extrapolation_volume,
22  Acts::Direction::Forward);
23  std::array<unsigned int,4> expected_layer_pattern {0u,0u,0u,0u};
24  for (const Acts::detail::Step &step : result.first ) {
25  // @TODO boundary check ?, does layer number match layer numbering in athena ?
26  // @TODO filter out dead modules
27  if (step.geoID.sensitive()) {
28  if (step.surface && step.surface->associatedDetectorElement()) {
29  const ActsDetectorElement *
30  actsDetEl = dynamic_cast<const ActsDetectorElement *>(step.surface->associatedDetectorElement());
31  if (actsDetEl) {
33  detEl = dynamic_cast<const InDetDD::SiDetectorElement *>(actsDetEl->upstreamDetectorElement());
34  if (detEl) {
35  if (detEl->isPixel()) {
37  unsigned int pattern_idx = type==InDetDD::PixelBarrel ? 0 : 1;
38  const PixelID* pixel_id = static_cast<const PixelID *>(detEl->getIdHelper());
39  expected_layer_pattern[pattern_idx] |= (1<< pixel_id->layer_disk(detEl->identify()) );
40  }
41  else if (detEl->isSCT()) {
42  // @TODO SCT/strip layer number should be shifted by total number of pixel layers ...
43  const SCT_ID* sct_id = static_cast<const SCT_ID *>(detEl->getIdHelper());
44  unsigned int pattern_idx = detEl->isBarrel() ? 2 : 3;
45  expected_layer_pattern[pattern_idx] |= (1<< sct_id->layer_disk(detEl->identify()) );
46  }
47  }
48  }
49  }
50  }
51  }
52  return expected_layer_pattern;
53  }
54 }
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
get_generator_info.result
result
Definition: get_generator_info.py:21
ActsTrk::expectedLayerPattern
std::array< unsigned int, 4 > expectedLayerPattern(const EventContext &ctx, const IActsExtrapolationTool &extrapolator, Acts::BoundTrackParameters perigee_parameters, const Acts::CylinderSurface &extrapolation_volume)
Extrapolate from the perigee outwards and gather information which detector layers should have hits.
Definition: ExpectedHitUtils.cxx:14
ActsDetectorElement::upstreamDetectorElement
const GeoVDetectorElement * upstreamDetectorElement() const
Returns the underllying GeoModel detectorelement that this one is based on.
Definition: ActsDetectorElement.cxx:288
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:83
InDetDD::SolidStateDetectorElementBase::getIdHelper
const AtlasDetectorID * getIdHelper() const
Returns the id helper (inline)
IActsExtrapolationTool
Definition: IActsExtrapolationTool.h:31
InDetDD::DetectorType
DetectorType
Definition: DetectorDesign.h:45
InDetDD::DetectorDesign::type
virtual DetectorType type() const
Type of element.
Definition: DetectorDesign.cxx:101
ActsDetectorElement
Definition: ActsDetectorElement.h:42
ActsDetectorElement.h
InDetDD::SiDetectorElement::isPixel
bool isPixel() const
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:626
InDetDD::PixelBarrel
@ PixelBarrel
Definition: DetectorDesign.h:46
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
InDetDD::SiDetectorElement::isBarrel
bool isBarrel() const
SiDetectorElement.h
SCT_ID
Definition: SCT_ID.h:68
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LArCellBinning.step
step
Definition: LArCellBinning.py:158
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:34
InDetDD::SiDetectorElement::isSCT
bool isSCT() const
IActsExtrapolationTool::propagationSteps
virtual ActsPropagationOutput propagationSteps(const EventContext &ctx, const Acts::BoundTrackParameters &startParameters, Acts::Direction navDir=Acts::Direction::Forward, double pathLimit=std::numeric_limits< double >::max()) const =0
InDetDD::SiDetectorElement::design
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
PixelID
Definition: PixelID.h:67
ExpectedHitUtils.h
InDetDD::SolidStateDetectorElementBase::identify
virtual Identifier identify() const override final
identifier of this detector element (inline)
ActsPropagationOutput
std::pair< std::vector< Acts::detail::Step >, ActsRecordedMaterial > ActsPropagationOutput
Finally the output of the propagation test.
Definition: IActsExtrapolationTool.h:25
IActsExtrapolationTool.h