Loading [MathJax]/extensions/tex2jax.js
 |
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];
41 return StatusCode::FAILURE;
46 return StatusCode::SUCCESS;
51 return StatusCode::SUCCESS;
59 for (
unsigned ihit1 = 0; ihit1 <
hits.size(); ihit1++) {
60 std::shared_ptr<const FPGATrackSimHit> hit1 =
hits[ihit1];
61 for (
unsigned ihit2 = ihit1+1; ihit2 <
hits.size(); ihit2++) {
62 std::shared_ptr<const FPGATrackSimHit> hit2 =
hits[ihit2];
65 const double radiusDifference = hit2->
getR() - hit1->
getR();
90 return StatusCode::SUCCESS;
107 const pvec center =
p1 + halfDiff + rprime;
114 if (xbefore == -1) xbefore =
x;
116 const int xmin = (xbefore <
x)? xbefore:
x;
117 const int xmax = (xbefore <
x)?
x: xbefore;
118 for (
int xinterpolated =
xmin; xinterpolated <=
xmax; ++xinterpolated) {
119 image(xinterpolated,
y).first++;
120 image(xinterpolated,
y).second.insert( hit1 );
121 image(xinterpolated,
y).second.insert( hit2 );
125 image(
x,
y).second.insert( hit1 );
126 image(
x,
y).second.insert( hit2 );
131 return StatusCode::SUCCESS;
136 std::vector<std::shared_ptr<const FPGATrackSimHit>> road_hits;
138 for (
const auto & hit :
hits)
140 road_hits.push_back(hit);
141 hitLayers |= 1 << hit->getLayer();
145 sorted_hits.resize(8);
148 r.setHitLayers(hitLayers);
149 r.setHits(std::move(sorted_hits));
164 const auto centerValue =
image(
x,
y).first;
167 if (
image(xaround,yaround).first > centerValue )
unsigned getLayer() const
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string to_string(const DetectorType &type)
constexpr int pow(int base, int exp) noexcept
std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit > > > sortByLayer(Container const &hits)