  | 
  
    ATLAS Offline Software
    
   | 
 
 
 
 
#include <AFPFastReco.h>
Definition at line 50 of file AFPFastReco.h.
 
◆ AFPFastReco()
Constructor. Sets input hit container. 
Definition at line 54 of file AFPFastReco.h.
 
 
◆ areNeighbours() [1/2]
Checks if given clusters are neighbours. 
Definition at line 139 of file AFPFastReco.cxx.
  141     if (lhs.station != rhs.station) 
return false;
 
  143     const float dx = lhs.x - rhs.x;
 
  144     const float dy = lhs.y - rhs.y;
 
 
 
 
◆ areNeighbours() [2/2]
◆ clusters()
◆ findAround()
template<class T > 
  
  
      
        
          | std::vector< T > AFPMon::AFPFastReco::findAround  | 
          ( | 
          T  | 
          init,  | 
         
        
           | 
           | 
          std::list< T > &  | 
          toJoin  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
private   | 
  
 
Finds hits/clusters around given init element. 
Definition at line 107 of file AFPFastReco.h.
  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);
 
 
 
 
◆ linReg()
  
  
      
        
          | std::pair< double, double > AFPMon::AFPFastReco::linReg  | 
          ( | 
          const std::vector< std::pair< double, double >> &  | 
          YX | ) | 
           const | 
         
       
   | 
  
private   | 
  
 
Returns parameters of fitted line. 
Definition at line 99 of file AFPFastReco.cxx.
  103     for (
const auto& yx : YX) 
 
  112     double numerator   = 0;
 
  113     double denumerator = 0;
 
  114     for (
const auto& yx : YX) 
 
  116         const double dy = yx.first - meany;
 
  117         const double dx = yx.second - meanx;
 
  118         numerator += 
dx * 
dy;
 
  119         denumerator += 
dx * 
dx;
 
  122     if(denumerator==0.0) denumerator=1
e-6;
 
  123     const double slope    = numerator / denumerator;
 
  124     const double position = meany - slope * meanx;
 
  126     return {position, slope};
 
 
 
 
◆ reco()
      
        
          | void AFPMon::AFPFastReco::reco  | 
          ( | 
           | ) | 
           | 
        
      
 
Performs fast reconstruction of clusters and tracks. 
Definition at line 16 of file AFPFastReco.cxx.
 
 
◆ recoClusters()
  
  
      
        
          | void AFPMon::AFPFastReco::recoClusters  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Performs fast cluster reconstruction. 
Definition at line 22 of file AFPFastReco.cxx.
   24     constexpr 
float dx   = 0.25;  
 
   25     constexpr 
float dy   = 0.05;  
 
   26     constexpr 
float dz   = 9.00;  
 
   27     constexpr 
float tilt = 14. / 180. * 
M_PI;
 
   31     while (!toCluster.empty()) 
 
   33         const auto *
init = *(toCluster.begin());
 
   34         toCluster.pop_front();
 
   43             const float charge = 
h->depositedCharge();
 
   44             const float pixX   = 
dx * 
h->pixelColIDChip();
 
   45             const float pixY   = 
dy * 
h->pixelRowIDChip();
 
   49             sumToT_temp += 
h->timeOverThreshold();
 
   52         const float xPlane = sumX / sumCharge;
 
   53         const float yPlane = sumY / sumCharge;
 
   56         const int layerID   = 
init->pixelLayerID();
 
   58         const float x = xPlane;
 
   60         const float z = yPlane * 
std::sin(tilt) + dz * layerID;
 
   62         m_clusters.emplace_back(
x, 
y, 
z, stationID, layerID, sumToT_temp);
 
 
 
 
◆ recoTracks()
  
  
      
        
          | void AFPMon::AFPFastReco::recoTracks  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Performs fast track reconstruction. 
Definition at line 66 of file AFPFastReco.cxx.
   70     while (!toTrack.empty()) 
 
   72         auto init = *(toTrack.begin());
 
   80         std::vector<std::pair<double, double>> XZ;
 
   81         std::vector<std::pair<double, double>> YZ;
 
   83         for (
const auto& cluster : trackCandidate) 
 
   87             XZ.emplace_back(cluster.x, cluster.z);
 
   88             YZ.emplace_back(cluster.y, cluster.z);
 
   91         const auto [
x, xSlope] = 
linReg(XZ);
 
   92         const auto [
y, ySlope] = 
linReg(YZ);
 
   93         const int station      = trackCandidate[0].station;
 
 
 
 
◆ tracks()
  
  
      
        
          | const std::vector<AFPTrack>& AFPMon::AFPFastReco::tracks  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ m_clusters
  
  
      
        
          | std::vector<AFPCluster> AFPMon::AFPFastReco::m_clusters | 
         
       
   | 
  
private   | 
  
 
 
◆ m_hitContainer
◆ m_tracks
  
  
      
        
          | std::vector<AFPTrack> AFPMon::AFPFastReco::m_tracks | 
         
       
   | 
  
private   | 
  
 
 
◆ s_afpLayers
  
  
      
        
          | constexpr int AFPMon::AFPFastReco::s_afpLayers = 4 | 
         
       
   | 
  
staticconstexprprivate   | 
  
 
Number of layers in each station. 
Definition at line 98 of file AFPFastReco.h.
 
 
◆ s_afpStations
  
  
      
        
          | constexpr int AFPMon::AFPFastReco::s_afpStations = 4 | 
         
       
   | 
  
staticconstexprprivate   | 
  
 
 
◆ s_clusterDistance
  
  
      
        
          | constexpr float AFPMon::AFPFastReco::s_clusterDistance = 0.4 | 
         
       
   | 
  
staticconstexprprivate   | 
  
 
 
◆ s_trackSize
  
  
      
        
          | constexpr int AFPMon::AFPFastReco::s_trackSize = 3 | 
         
       
   | 
  
staticconstexprprivate   | 
  
 
Minimum number of clusters in track. 
Definition at line 101 of file AFPFastReco.h.
 
 
The documentation for this class was generated from the following files:
 
std::vector< T > findAround(T init, std::list< T > &toJoin) const
Finds hits/clusters around given init element.
 
static constexpr int s_trackSize
Minimum number of clusters in track.
 
std::pair< double, double > linReg(const std::vector< std::pair< double, double >> &YX) const
Returns parameters of fitted line.
 
int pixelLayerID() const
Index of the layer of pixels, i.e.
 
Class representing a hit in silicon detector.
 
static constexpr float s_clusterDistance
Maximum distance between cluster.
 
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.
 
std::vector< AFPTrack > m_tracks
Vector of tracks.
 
int pixelColIDChip() const
Index of the pixel column in chip coordinate system.
 
void recoClusters()
Performs fast cluster reconstruction.
 
constexpr uint8_t stationID
Large or Small wedge.
 
const xAOD::AFPSiHitContainer * m_hitContainer
Pointer to hit container.
 
void recoTracks()
Performs fast track reconstruction.
 
std::vector< AFPCluster > m_clusters
Vector of clusters.
 
double charge(const T &p)
 
def init(v_theApp, v_rootStream=None)
 
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
 
int pixelRowIDChip() const
Index of the pixel row in chip coordinate system.
 
int stationID() const
Index of the station with pixel hit.
 
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.