ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsEvent
Root
ExpectedHitUtils.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
ActsGeometry/ActsDetectorElement.h
"
6
#include "
InDetIdentifier/PixelID.h
"
7
#include "
InDetIdentifier/SCT_ID.h
"
8
#include "
InDetReadoutGeometry/SiDetectorElement.h
"
9
10
#include "
ActsEvent/ExpectedHitUtils.h
"
11
12
namespace
ActsTrk::detail
{
13
14
std::array<unsigned int,4>
expectedLayerPattern
(
const
EventContext& ctx,
15
const
IExtrapolationTool
&extrapolator,
16
const
Acts::BoundTrackParameters& perigee_parameters,
17
double
pathLimit) {
18
std::array<unsigned int,4> expected_layer_pattern {0u,0u,0u,0u};
19
auto
result = extrapolator.
propagationSteps
(ctx,
20
perigee_parameters,
21
Acts::Direction::Forward(),
22
pathLimit);
23
if
(!result.ok()) {
24
return
expected_layer_pattern;
25
}
26
for
(
const
Acts::detail::Step &step : result->first ) {
27
// @TODO boundary check ?, does layer number match layer numbering in athena ?
28
// @TODO filter out dead modules
29
if
(!step.geoID.sensitive()) {
30
continue
;
31
}
32
const
auto
* actsDetEl =
getActsDetectorElement
(step.surface);
33
if
(actsDetEl) {
34
addToExpectedLayerPattern
(expected_layer_pattern, *actsDetEl);
35
}
36
37
}
38
39
40
return
expected_layer_pattern;
41
}
42
43
void
addToExpectedLayerPattern
(std::array<unsigned int,4>& pattern,
const
ActsDetectorElement
& detElement) {
44
const
InDetDD::SiDetectorElement
*
45
detEl =
dynamic_cast<
const
InDetDD::SiDetectorElement
*
>
(detElement.
upstreamDetectorElement
());
46
if
(detEl) {
47
if
(detEl->
isPixel
()) {
48
InDetDD::DetectorType
type
= detEl->
design
().
type
();
49
unsigned
int
pattern_idx =
type
==
InDetDD::PixelBarrel
? 0 : 1;
50
const
PixelID
* pixel_id =
static_cast<
const
PixelID
*
>
(detEl->
getIdHelper
());
51
pattern[pattern_idx] |= (1<< pixel_id->
layer_disk
(detEl->
identify
()) );
52
}
53
else
if
(detEl->
isSCT
()) {
54
// @TODO SCT/strip layer number should be shifted by total number of pixel layers ...
55
const
SCT_ID
* sct_id =
static_cast<
const
SCT_ID
*
>
(detEl->
getIdHelper
());
56
unsigned
int
pattern_idx = detEl->
isBarrel
() ? 2 : 3;
57
pattern[pattern_idx] |= (1<< sct_id->
layer_disk
(detEl->
identify
()) );
58
}
59
}
60
}
61
}
ActsDetectorElement.h
getActsDetectorElement
const ActsDetectorElement * getActsDetectorElement(const Acts::Surface &surf)
Attempts to retrieve the ActsDetectorElement associated to the passed ActsSurface.
Definition
ActsDetectorElement.cxx:53
ExpectedHitUtils.h
PixelID.h
This is an Identifier helper class for the Pixel subdetector.
SCT_ID.h
This is an Identifier helper class for the SCT subdetector.
SiDetectorElement.h
ActsDetectorElement
Definition
ActsDetectorElement.h:58
ActsDetectorElement::upstreamDetectorElement
const GeoVDetectorElement * upstreamDetectorElement() const
Returns the underllying GeoModel detectorelement that this one is based on.
Definition
ActsDetectorElement.cxx:308
ActsTrk::IExtrapolationTool
Tool to extrapolate bound track parameters through the Acts::TrackingGeometry.
Definition
IExtrapolationTool.h:30
ActsTrk::IExtrapolationTool::propagationSteps
virtual Acts::Result< PropagationOutput > propagationSteps(const EventContext &ctx, const Acts::BoundTrackParameters &startParameters, const Acts::Direction navDir=Acts::Direction::Forward(), const double pathLimit=1._km) const =0
Extrapolate the track parameters until the end of the world and record the performed steps & the allo...
InDetDD::DetectorDesign::type
virtual DetectorType type() const
Type of element.
Definition
DetectorDesign.cxx:101
InDetDD::SiDetectorElement
Class to hold geometrical description of a silicon detector element.
Definition
SiDetectorElement.h:109
InDetDD::SiDetectorElement::design
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
InDetDD::SiDetectorElement::isSCT
bool isSCT() const
InDetDD::SiDetectorElement::isPixel
bool isPixel() const
InDetDD::SiDetectorElement::isBarrel
bool isBarrel() const
InDetDD::SolidStateDetectorElementBase::identify
virtual Identifier identify() const override final
identifier of this detector element (inline)
InDetDD::SolidStateDetectorElementBase::getIdHelper
const AtlasDetectorID * getIdHelper() const
Returns the id helper (inline).
PixelID
This is an Identifier helper class for the Pixel subdetector.
Definition
PixelID.h:69
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition
PixelID.h:602
SCT_ID
This is an Identifier helper class for the SCT subdetector.
Definition
SCT_ID.h:68
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition
SCT_ID.h:687
ActsTrk::detail
Hash functions to pack the source link into unordered_maps / unordered_sets.
Definition
MeasurementCalibratorBase.h:31
ActsTrk::detail::expectedLayerPattern
std::array< unsigned int, 4 > expectedLayerPattern(const EventContext &ctx, const ActsTrk::IExtrapolationTool &extrapolator, const Acts::BoundTrackParameters &perigee_parameters, double pathLimit)
Extrapolate from the perigee outwards and gather information which detector layers should have hits.
Definition
ExpectedHitUtils.cxx:14
ActsTrk::detail::addToExpectedLayerPattern
void addToExpectedLayerPattern(std::array< unsigned int, 4 > &pattern, const ActsDetectorElement &detElement)
Definition
ExpectedHitUtils.cxx:43
InDetDD::DetectorType
DetectorType
Definition
DetectorDesign.h:45
InDetDD::PixelBarrel
@ PixelBarrel
Definition
DetectorDesign.h:46
type
Generated on
for ATLAS Offline Software by
1.17.0