37 std::map<std::string, float> features;
38 features[
"x"] =
sp->globalPosition().x();
39 features[
"y"] =
sp->globalPosition().y();
40 features[
"z"] =
sp->globalPosition().z();
41 features[
"r"] =
sp->r();
42 features[
"phi"] =
sp->phi();
43 features[
"eta"] =
sp->eta();
52 features[
"cluster_eta_1"] = -1 * std::log(std::tan(0.5 * std::atan2(features[
"cluster_r_1"], features[
"cluster_z_1"])));
55 bool isStrip = (cluster_2 !=
nullptr);
58 float charge_count_1 = 0;
59 int pixel_count_1 = 0;
60 float loc_eta_1 = 0, loc_phi_1 = 0;
61 float glob_eta_1 = 0, glob_phi_1 = 0;
62 float localDir0_1 = 0, localDir1_1 = 0, localDir2_1 = 0;
63 float lengthDir0_1 = 0, lengthDir1_1 = 0, lengthDir2_1 = 0;
64 float eta_angle_1 = 0, phi_angle_1 = 0;
67 features[
"module_id"] =
static_cast<float>(module_id);
81 switch (barrel_endcap) {
102 for (
unsigned int rdo = 0; rdo < cluster->
rdoList().size(); rdo++) {
103 charge_count_1 += cluster->
totList().at(rdo);
106 const auto &rdoID = cluster->
rdoList().at(rdo);
133 Amg::Vector3D localDirection = localEndPosition - localStartPosition;
136 localDir0_1 = localDirection[0];
137 localDir1_1 = localDirection[1];
138 localDir2_1 = localDirection[2];
143 Amg::Vector3D direction = globalEndPosition - globalStartPosition;
150 float trkphicomp = direction.dot(my_phiax);
151 float trketacomp = direction.dot(my_etaax);
152 float trknormcomp = direction.dot(my_normal);
153 eta_angle_1 = atan2(trknormcomp, trketacomp);
154 phi_angle_1 = atan2(trknormcomp, trkphicomp);
158 glob_eta_1, glob_phi_1,
159 localDir0_1, localDir1_1, localDir2_1,
160 lengthDir0_1, lengthDir1_1, lengthDir2_1,
161 eta_angle_1, phi_angle_1
163 if (status.isFailure()) {
164 ATH_MSG_ERROR(
"Failed at " << __LINE__ <<
" of getting SCT cluster shape info.");
167 int barrel_endcap =
m_SCT_ID->barrel_ec(cluster->identify());
168 switch (barrel_endcap) {
183 features[
"charge_count_1"] = charge_count_1;
184 features[
"count_1"] = pixel_count_1;
185 features[
"loc_eta_1"] = loc_eta_1;
186 features[
"loc_phi_1"] = loc_phi_1;
187 features[
"glob_eta_1"] = glob_eta_1;
188 features[
"glob_phi_1"] = glob_phi_1;
189 features[
"localDir0_1"] = localDir0_1;
190 features[
"localDir1_1"] = localDir1_1;
191 features[
"localDir2_1"] = localDir2_1;
192 features[
"lengthDir0_1"] = lengthDir0_1;
193 features[
"lengthDir1_1"] = lengthDir1_1;
194 features[
"lengthDir2_1"] = lengthDir2_1;
195 features[
"eta_angle_1"] = eta_angle_1;
196 features[
"phi_angle_1"] = phi_angle_1;
197 features[
"region"] = region;
205 features[
"cluster_eta_2"] = -1 * std::log(std::tan(0.5 * std::atan2(features[
"cluster_r_2"], features[
"cluster_z_2"])));
207 float charge_count_2 = 0;
208 int pixel_count_2 = 0;
209 float loc_eta_2 = 0, loc_phi_2 = 0;
210 float glob_eta_2 = 0, glob_phi_2 = 0;
211 float localDir0_2 = 0, localDir1_2 = 0, localDir2_2 = 0;
212 float lengthDir0_2 = 0, lengthDir1_2 = 0, lengthDir2_2 = 0;
213 float eta_angle_2 = 0, phi_angle_2 = 0;
215 glob_eta_2, glob_phi_2,
216 localDir0_2, localDir1_2, localDir2_2,
217 lengthDir0_2, lengthDir1_2, lengthDir2_2,
218 eta_angle_2, phi_angle_2
220 if (status.isFailure()) {
221 ATH_MSG_ERROR(
"Failed at " << __LINE__ <<
" of getting SCT cluster shape info.");
224 features[
"charge_count_2"] = charge_count_2;
225 features[
"count_2"] = pixel_count_2;
226 features[
"loc_eta_2"] = loc_eta_2;
227 features[
"loc_phi_2"] = loc_phi_2;
228 features[
"glob_eta_2"] = glob_eta_2;
229 features[
"glob_phi_2"] = glob_phi_2;
230 features[
"localDir0_2"] = localDir0_2;
231 features[
"localDir1_2"] = localDir1_2;
232 features[
"localDir2_2"] = localDir2_2;
233 features[
"lengthDir0_2"] = lengthDir0_2;
234 features[
"lengthDir1_2"] = lengthDir1_2;
235 features[
"lengthDir2_2"] = lengthDir2_2;
236 features[
"eta_angle_2"] = eta_angle_2;
237 features[
"phi_angle_2"] = phi_angle_2;
240 features[
"cluster_x_2"] = features[
"cluster_x_1"];
241 features[
"cluster_y_2"] = features[
"cluster_y_1"];
242 features[
"cluster_z_2"] = features[
"cluster_z_1"];
243 features[
"cluster_r_2"] = features[
"cluster_r_1"];
244 features[
"cluster_phi_2"] = features[
"cluster_phi_1"];
245 features[
"cluster_eta_2"] = features[
"cluster_eta_1"];
246 features[
"charge_count_2"] = features[
"charge_count_1"];
247 features[
"count_2"] = features[
"count_1"];
248 features[
"loc_eta_2"] = features[
"loc_eta_1"];
249 features[
"loc_phi_2"] = features[
"loc_phi_1"];
250 features[
"glob_eta_2"] = features[
"glob_eta_1"];
251 features[
"glob_phi_2"] = features[
"glob_phi_1"];
252 features[
"localDir0_2"] = features[
"localDir0_1"];
253 features[
"localDir1_2"] = features[
"localDir1_1"];
254 features[
"localDir2_2"] = features[
"localDir2_1"];
255 features[
"lengthDir0_2"] = features[
"lengthDir0_1"];
256 features[
"lengthDir1_2"] = features[
"lengthDir1_1"];
257 features[
"lengthDir2_2"] = features[
"lengthDir2_1"];
258 features[
"eta_angle_2"] = features[
"eta_angle_1"];
259 features[
"phi_angle_2"] = features[
"phi_angle_1"];
277 float &charge_count,
int &pixel_count,
float &loc_eta,
float &loc_phi,
278 float &glob_eta,
float &glob_phi,
279 float &localDir0,
float &localDir1,
float &localDir2,
280 float &lengthDir0,
float &lengthDir1,
float &lengthDir2,
281 float &eta_angle,
float &phi_angle
287 std::pair<Amg::Vector3D, Amg::Vector3D> ends(
290 lengthDir0 = JanDirection[0];
291 lengthDir1 = JanDirection[1];
292 lengthDir2 = JanDirection[2];
299 ATH_MSG_ERROR(
"Failed at " << __LINE__ <<
" of accessing SCT ModuleSide Design");
300 return StatusCode::FAILURE;
304 int max_strip = -999;
309 for (
unsigned int rdo = 0; rdo < cluster->
rdoList().size(); rdo++) {
310 const auto &rdoID = cluster->
rdoList().at(rdo);
329 Amg::Vector3D localDirection = localEndPosition - localStartPosition;
331 localDir0 = localDirection[0];
332 localDir1 = localDirection[1];
333 localDir2 = localDirection[2];
338 Amg::Vector3D direction = globalEndPosition - globalStartPosition;
345 float trkphicomp = direction.dot(my_phiax);
346 float trketacomp = direction.dot(my_etaax);
347 float trknormcomp = direction.dot(my_normal);
348 phi_angle = atan2(trknormcomp, trkphicomp);
349 eta_angle = atan2(trknormcomp, trketacomp);
351 return StatusCode::SUCCESS;