7#include "Acts/Surfaces/PerigeeSurface.hpp"
11 const std::string& name,
12 const IInterface* parent)
13 : base_class(
type,name,parent)
19 std::vector<ActsTrk::ProtoTrack> & foundProtoTracks )
const {
21 ATH_MSG_VERBOSE(
"Generate a random proto track in "<<ctx.eventID()<<
" from "<<pixelContainer.size()<<
" pixel measurements "
22 <<
", "<<stripContainer.size()<<
" strip measurements");
23 std::vector<const xAOD::UncalibratedMeasurement*> dummyPoints;
26 for (
size_t k = 0; k < nPix; ++k){
27 auto index = rand() % pixelContainer.size();
28 dummyPoints.push_back(pixelContainer.at(
index));
32 for (
size_t k = 0; k < nStrip; ++k){
33 auto index = rand() % stripContainer.size();
34 dummyPoints.push_back(stripContainer.at(
index));
37 ATH_MSG_DEBUG(
"Made a proto-track with " <<dummyPoints.size()<<
" random clusters");
44 foundProtoTracks.push_back({dummyPoints,std::move(inputPerigee)});
46 return StatusCode::SUCCESS;
51 return dynamic_cast <const xAOD::PixelCluster*
>(theMeas)->globalPosition().cast<
double>();
53 return dynamic_cast<const xAOD::StripCluster*
>(theMeas)->globalPosition().cast<
double>();
55 return Amg::Vector3D::Zero();
61 using namespace Acts::UnitLiterals;
62 std::shared_ptr<const Acts::Surface> actsSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(
63 Acts::Vector3::Zero());
64 Acts::BoundVector params;
72 globalPos.phi(), globalPos.theta(),
73 1. / (1000000000. * 1_MeV), 0.;
77 Acts::BoundMatrix cov = Acts::BoundMatrix::Identity();
80 return std::make_unique<Acts::BoundTrackParameters>(actsSurface, params,
81 cov, Acts::ParticleHypothesis::pion());
#define ATH_MSG_VERBOSE(x)
virtual xAOD::UncalibMeasType type() const =0
Returns the type of the measurement type as a simple enumeration.
Eigen::Matrix< double, 3, 1 > Vector3D
PixelClusterContainer_v1 PixelClusterContainer
Define the version of the pixel cluster container.
StripCluster_v1 StripCluster
Define the version of the strip cluster class.
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.
StripClusterContainer_v1 StripClusterContainer
Define the version of the strip cluster container.
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.