1#ifndef AFP_MONITORING_AFPFASTRECO_H
2#define AFP_MONITORING_AFPFASTRECO_H
16 AFPCluster(
float x_,
float y_,
float z_,
int s,
int l,
int sumToT_)
29 if (lhs.
x != rhs.
x)
return false;
30 if (lhs.
y != rhs.
y)
return false;
31 if (lhs.
z != rhs.
z)
return false;
41 AFPTrack(
float x_,
float y_,
int s, std::array<int, 4>
a)
73 std::pair<double, double>
linReg(
const std::vector<std::pair<double, double>>& YX)
const;
77 std::vector<T>
findAround(T init, std::list<T>& toJoin)
const;
109 std::vector<T> element;
110 element.push_back(init);
112 std::vector<T> newNeighbours;
115 newNeighbours.clear();
116 for (
auto& b : toJoin)
119 for (
auto&
a : element)
128 newNeighbours.push_back(b);
129 element.push_back(b);
133 for (
auto& t : newNeighbours)
136 }
while (newNeighbours.size() > 0);
void reco()
Performs fast reconstruction of clusters and tracks.
static constexpr int s_trackSize
Minimum number of clusters in track.
void recoClusters()
Performs fast cluster reconstruction.
const std::vector< AFPTrack > & tracks() const
Returns vector of tracks.
static constexpr float s_clusterDistance
Maximum distance between cluster.
const xAOD::AFPSiHitContainer * m_hitContainer
Pointer to hit container.
std::vector< AFPTrack > m_tracks
Vector of tracks.
std::vector< T > findAround(T init, std::list< T > &toJoin) const
Finds hits/clusters around given init element.
AFPFastReco(const xAOD::AFPSiHitContainer *hits)
Constructor. Sets input hit container.
static constexpr int s_afpLayers
Number of layers in each station.
void recoTracks()
Performs fast track reconstruction.
std::pair< double, double > linReg(const std::vector< std::pair< double, double > > &YX) const
Returns parameters of fitted line.
std::vector< AFPCluster > m_clusters
Vector of clusters.
const std::vector< AFPCluster > & clusters() const
Returns vector of clusters.
bool areNeighbours(const xAOD::AFPSiHit *lhs, const xAOD::AFPSiHit *rhs) const
Checks if given hits are neighbours.
static constexpr int s_afpStations
Number of AFP stations.
bool operator==(const AFPCluster &lhs, const AFPCluster &rhs)
AFPSiHitContainer_v2 AFPSiHitContainer
AFPCluster(float x_, float y_, float z_, int s, int l, int sumToT_)
AFPTrack(float x_, float y_, int s, std::array< int, 4 > a)
std::array< int, 4 > layerClusters