57 {
58
60
62
63 HGTD::ExtensionObject
result;
64
65
68
70 <<
", y: " << last_param->
position().y()
71 <<
", z: " << last_param->
position().z());
73 <<
", py: " << last_param->
momentum().y()
74 <<
", pz: " << last_param->
momentum().z());
75
78
79
80 const Trk::TrackingGeometry* trk_geom =
m_extrapolator->trackingGeometry();
81 if (not trk_geom) {
84 }
85
86 bool is_pos_endcap = last_param->
eta() > 0;
87
88
89 const Trk::TrackingVolume* hgtd_trk_volume = trk_geom->trackingVolume(
90 is_pos_endcap ? "HGTD::PositiveEndcap" : "HGTD::NegativeEndcap");
91
92 if (not hgtd_trk_volume) {
95 }
96
97 const Trk::BinnedArray<Trk::Layer>* confined_layers =
98 hgtd_trk_volume->confinedLayers();
99
100 if (not confined_layers) {
103 }
104
105
106
107 std::span<Trk::Layer const * const>
layers = confined_layers->arrayObjects();
108 size_t layer_size =
layers.size();
109
110 short position = is_pos_endcap ? 0 : layer_size - 1;
111 short step = is_pos_endcap ? 1 : -1;
112 short hgtd_layer_i = -1;
114
116
117 if (
layer->layerType() != 1) {
118 continue;
119 }
120 hgtd_layer_i++;
121
122 const Trk::Surface& surf_obj =
layer->surfaceRepresentation();
124
125
126
127
128 std::unique_ptr<const Trk::TrackParameters> extrap_result = nullptr;
129
133 }
136 part);
137
138
139 if (not extrap_result) {
141 result.m_hits.at(hgtd_layer_i) =
nullptr;
142 result.m_truth_primary_hits.at(hgtd_layer_i) =
nullptr;
143 result.m_truth_primary_info.at(hgtd_layer_i) = HGTD::ClusterTruthInfo();
144 continue;
145 }
146
147
148 if (hgtd_layer_i == 0) {
149 result.m_extrap_x = extrap_result->position().x();
150 result.m_extrap_y = extrap_result->position().y();
151 }
152
154 << extrap_result->position().x()
155 << ", y: " << extrap_result->position().y()
156 << ", z: " << extrap_result->position().z());
158 << extrap_result->momentum().x()
159 << ", py: " << extrap_result->momentum().y()
160 << ", pz: " << extrap_result->momentum().z());
161
162
164
165 if (compatible_surfaces.empty()) {
167 result.m_hits.at(hgtd_layer_i) =
nullptr;
168 result.m_truth_primary_hits.at(hgtd_layer_i) =
nullptr;
169 result.m_truth_primary_info.at(hgtd_layer_i) = HGTD::ClusterTruthInfo();
170 continue;
171 }
172
173 auto extrapolated_params =
175
176 bool on_surface = false;
177 std::unique_ptr<const Trk::TrackStateOnSurface> updated_state =
179 container, on_surface);
180
181 if (not updated_state) {
182 result.m_hits.at(hgtd_layer_i) =
nullptr;
183 result.m_truth_primary_hits.at(hgtd_layer_i) =
nullptr;
184 result.m_truth_primary_info.at(hgtd_layer_i) = HGTD::ClusterTruthInfo();
185 result.m_holes_hgtd.at(hgtd_layer_i) = on_surface;
186 continue;
187 }
188
189
190 last_param = updated_state->trackParameters();
191
192
193 std::pair<const HGTD_Cluster*, HGTD::ClusterTruthInfo> truth_info =
195 hs_event, sim_data);
196
197 result.m_hits.at(hgtd_layer_i) = std::move(updated_state);
198 result.m_truth_primary_hits.at(hgtd_layer_i) = truth_info.first;
199 result.m_truth_primary_info.at(hgtd_layer_i) = truth_info.second;
200
201 }
202
204}
#define ATH_MSG_WARNING(x)
double eta() const
Access method for pseudorapidity - from momentum.
const Amg::Vector3D & momentum() const
Access method for the momentum.
const Amg::Vector3D & position() const
Access method for the position.
const Amg::Vector3D & center() const
Returns the center position of the Surface.
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
layers(flags, cells_name, *args, **kw)
Here we define wrapper functions to set up all of the standard corrections.
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.
const Amg::Vector3D & position() const
Method to retrieve the position of the Intersection.
ParametersBase< TrackParametersDim, Charged > TrackParameters
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any).
TruthParticle_v1 TruthParticle
Typedef to implementation.