|
ATLAS Offline Software
|
Go to the documentation of this file.
9 typedef std::array<fp_t, 2>
pvec;
16 return { {
a[0]+
b[0],
a[1]+
b[1]} };
19 return { {
a[0]-
b[0],
a[1]-
b[1]} };
27 return std::hypot(
v[0],
v[1]);
31 return { -
v[1],
v[0]};
35 return a[0]*
b[1] -
a[1]*
b[0];
42 declareInterface<IFPGATrackSimRoadFinderTool>(
this);
49 return StatusCode::FAILURE;
54 return StatusCode::SUCCESS;
59 return StatusCode::SUCCESS;
67 for (
unsigned ihit1 = 0; ihit1 <
hits.size(); ihit1++) {
68 std::shared_ptr<const FPGATrackSimHit> hit1 =
hits[ihit1];
69 for (
unsigned ihit2 = ihit1+1; ihit2 <
hits.size(); ihit2++) {
70 std::shared_ptr<const FPGATrackSimHit> hit2 =
hits[ihit2];
73 const double radiusDifference = hit2->
getR() - hit1->
getR();
98 return StatusCode::SUCCESS;
105 const pvec halfDiff = (
p2 -
p1)*0.5;
115 const pvec center =
p1 + halfDiff + rprime;
122 if (xbefore == -1) xbefore =
x;
124 const int xmin = (xbefore <
x)? xbefore:
x;
125 const int xmax = (xbefore <
x)?
x: xbefore;
126 for (
int xinterpolated =
xmin; xinterpolated <=
xmax; ++xinterpolated) {
127 image(xinterpolated,
y).first++;
128 image(xinterpolated,
y).second.insert( hit1 );
129 image(xinterpolated,
y).second.insert( hit2 );
133 image(
x,
y).second.insert( hit1 );
134 image(
x,
y).second.insert( hit2 );
139 return StatusCode::SUCCESS;
144 std::vector<std::shared_ptr<const FPGATrackSimHit>> road_hits;
146 for (
const auto & hit :
hits)
148 road_hits.push_back(hit);
149 hitLayers |= 1 << hit->getLayer();
153 sorted_hits.resize(8);
156 r.setHitLayers(hitLayers);
157 r.setHits(std::move(sorted_hits));
172 const auto centerValue =
image(
x,
y).first;
175 if (
image(xaround,yaround).first > centerValue )
unsigned getLayer() const
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string to_string(const DetectorType &type)
std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit > > > sortByLayer(Container const &hits)