Skip to content
Snippets Groups Projects
Commit 990d581f authored by Kristin Lohwasser's avatar Kristin Lohwasser
Browse files

adapted naming and changed/added copyright

parent 667f55a7
9 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!36664AFP DQM [rel 22],!36035AFP Run3 merge request - added automatic check,!32548AFP Run3 Monitoring DQ Data Quality - changes in python file,!28689First template for AFP Run3 Monitoring DQ Data Quality
......@@ -9,10 +9,10 @@
#include "xAODForward/AFPSiHit.h"
#include "xAODForward/AFPSiHitContainer.h"
namespace AfpMon {
namespace AFPMon {
struct AfpCluster {
AfpCluster(float x_, float y_, float z_, int s, int l)
struct AFPCluster {
AFPCluster(float x_, float y_, float z_, int s, int l)
: x {x_}, y {y_}, z {z_}, station {s}, layer {l} {}
float x;
......@@ -22,7 +22,7 @@ namespace AfpMon {
int layer;
};
inline bool operator==(const AfpCluster& lhs, const AfpCluster& rhs) {
inline bool operator==(const AFPCluster& lhs, const AFPCluster& rhs) {
if (lhs.x != rhs.x) return false;
if (lhs.y != rhs.y) return false;
if (lhs.z != rhs.z) return false;
......@@ -32,8 +32,8 @@ namespace AfpMon {
return true;
}
struct AfpTrack {
AfpTrack(float x_, float y_, int s, std::array<int, 4> a)
struct AFPTrack {
AFPTrack(float x_, float y_, int s, std::array<int, 4> a)
: x {x_}, y {y_}, station {s}, layerClusters {std::move(a)} {}
float x;
......@@ -42,19 +42,19 @@ namespace AfpMon {
std::array<int, 4> layerClusters;
};
class AfpFastReco {
class AFPFastReco {
public:
/// Constructor. Sets input hit container
AfpFastReco(const xAOD::AFPSiHitContainer* hits) : m_hitContainer {hits} {}
AFPFastReco(const xAOD::AFPSiHitContainer* hits) : m_hitContainer {hits} {}
/// Performs fast reconstruction of clusters and tracks
void reco();
/// Returns vector of clusters
std::vector<AfpCluster> clusters() const { return m_clusters; }
std::vector<AFPCluster> clusters() const { return m_clusters; }
/// Returns vector of tracks
std::vector<AfpTrack> tracks() const { return m_tracks; }
std::vector<AFPTrack> tracks() const { return m_tracks; }
private:
/// Performs fast cluster reconstruction
......@@ -74,18 +74,18 @@ namespace AfpMon {
bool areNeighbours(const xAOD::AFPSiHit* lhs, const xAOD::AFPSiHit* rhs) const;
/// Checks if given clusters are neighbours
bool areNeighbours(const AfpCluster& lhs, const AfpCluster& rhs) const;
bool areNeighbours(const AFPCluster& lhs, const AFPCluster& rhs) const;
/// Pointer to hit container
const xAOD::AFPSiHitContainer* m_hitContainer;
/// Vector of clusters
std::vector<AfpCluster> m_clusters;
std::vector<AFPCluster> m_clusters;
/// Vector of tracks
std::vector<AfpTrack> m_tracks;
std::vector<AFPTrack> m_tracks;
/// Number of Afp stations
/// Number of AFP stations
static constexpr int s_afpStations = 4;
/// Number of layers in each station
......@@ -99,7 +99,7 @@ namespace AfpMon {
};
template <class T>
std::vector<T> AfpFastReco::findAround(T init, std::list<T>& toJoin) const {
std::vector<T> AFPFastReco::findAround(T init, std::list<T>& toJoin) const {
std::vector<T> element;
element.push_back(init);
......@@ -125,7 +125,7 @@ namespace AfpMon {
return element;
}
} // namespace AfpMon
} // namespace AFPMon
#endif /* AFP_MONITORING_AFPFASTRECO_H */
#include <Run3AFPMonitoring/AfpFastReco.h>
/*
* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
* *
* *
* * AFPFastReco.cxx
* *
* *
* */
namespace AfpMon {
#include <Run3AFPMonitoring/AFPFastReco.h>
void AfpFastReco::reco() {
namespace AFPMon {
void AFPFastReco::reco() {
recoClusters();
recoTracks();
}
void AfpFastReco::recoClusters() {
void AFPFastReco::recoClusters() {
constexpr float dx = 0.25; // [mm]
constexpr float dy = 0.05; // [mm]
constexpr float dz = 9.00; // [mm]
......@@ -46,7 +55,7 @@ namespace AfpMon {
}
}
void AfpFastReco::recoTracks() {
void AFPFastReco::recoTracks() {
std::list toTrack(m_clusters.begin(), m_clusters.end());
while (toTrack.size() > 0) {
......@@ -76,7 +85,7 @@ namespace AfpMon {
}
}
std::pair<double, double> AfpFastReco::linReg(std::vector<std::pair<double, double>> YX) const {
std::pair<double, double> AFPFastReco::linReg(std::vector<std::pair<double, double>> YX) const {
double meanx = 0;
double meany = 0;
for (const auto& yx : YX) {
......@@ -102,7 +111,7 @@ namespace AfpMon {
return {position, slope};
}
bool AfpFastReco::areNeighbours(const xAOD::AFPSiHit* lhs, const xAOD::AFPSiHit* rhs) const {
bool AFPFastReco::areNeighbours(const xAOD::AFPSiHit* lhs, const xAOD::AFPSiHit* rhs) const {
if (lhs->stationID() != rhs->stationID()) return false;
if (lhs->pixelLayerID() != rhs->pixelLayerID()) return false;
if (lhs->pixelColIDChip() != rhs->pixelColIDChip()) return false;
......@@ -111,7 +120,7 @@ namespace AfpMon {
return true;
}
bool AfpFastReco::areNeighbours(const AfpCluster& lhs, const AfpCluster& rhs) const {
bool AFPFastReco::areNeighbours(const AFPCluster& lhs, const AFPCluster& rhs) const {
if (lhs.station != rhs.station) return false;
const float dx = lhs.x - rhs.x;
......@@ -121,5 +130,5 @@ namespace AfpMon {
return true;
}
} // namespace AfpMon
} // namespace AFPMon
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*
*
* AFPSiLayerAlgorithm
......@@ -11,7 +11,7 @@
#include "StoreGate/ReadHandleKey.h"
#include "xAODForward/AFPStationID.h"
#include <Run3AFPMonitoring/AfpFastReco.h>
#include <Run3AFPMonitoring/AFPFastReco.h>
AFPSiLayerAlgorithm::AFPSiLayerAlgorithm( const std::string& name, ISvcLocator* pSvcLocator )
......@@ -89,7 +89,7 @@ StatusCode AFPSiLayerAlgorithm::fillHistograms( const EventContext& ctx ) const
else ATH_MSG_WARNING("Unrecognised station index: " << hitsItr->stationID());
}
AfpMon::AfpFastReco fast(afpHitContainer.get());
AFPMon::AFPFastReco fast(afpHitContainer.get());
fast.reco();
for (const auto& cluster : fast.clusters()) {
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*
*
* AFPToFAlgorithm
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment