Commit ac31e2cf authored by Sejla Hadzic's avatar Sejla Hadzic
Browse files

AnalysisEfficiency: renamed parameter to require_associated_cluster_on

parent bdf9dfb7
......@@ -27,7 +27,7 @@ AnalysisEfficiency::AnalysisEfficiency(Configuration& config, std::shared_ptr<De
m_timeCutFrameEdge = config_.get<double>("time_cut_frameedge");
m_chi2ndofCut = config_.get<double>("chi2ndof_cut");
m_inpixelBinSize = config_.get<double>("inpixel_bin_size");
require_detectors_ = config_.getArray<std::string>("require_detectors", {});
require_associated_cluster_on_ = config_.getArray<std::string>("require_associated_cluster_on", {});
}
void AnalysisEfficiency::initialize() {
......@@ -308,17 +308,17 @@ StatusCode AnalysisEfficiency::run(const std::shared_ptr<Clipboard>& clipboard)
}
// check if track has an associated cluster on required detector(s):
auto foundRequiredDetector = [this](Track* t) {
for(auto& requireDet : require_detectors_) {
if(!requireDet.empty() && t->getAssociatedClusters(requireDet).size() == 0) {
LOG(DEBUG) << "No cluster from required detector " << requireDet << " on the track.";
auto foundRequiredAssocCluster = [this](Track* t) {
for(auto& requireAssocCluster : require_associated_cluster_on_) {
if(!requireAssocCluster.empty() && t->getAssociatedClusters(requireAssocCluster).size() == 0) {
LOG(DEBUG) << "No associated cluster from required detector " << requireAssocCluster << " on the track.";
return false;
}
}
return true;
};
if(!foundRequiredDetector(track.get())) {
n_requiredet++;
if(!foundRequiredAssocCluster(track.get())) {
n_requirecluster++;
continue;
}
......@@ -436,7 +436,7 @@ void AnalysisEfficiency::finalize(const std::shared_ptr<ReadonlyClipboard>&) {
<< "* track outside DUT -" << n_dut << std::endl
<< "* track close to masked px -" << n_masked << std::endl
<< "* track close to frame edge -" << n_frameedge << std::endl
<< "* track without an associated cluster on required detector - " << n_requiredet << std::endl
<< "* track without an associated cluster on required detector - " << n_requirecluster << std::endl
<< "Accepted tracks: " << total_tracks;
double totalEff = 100 * static_cast<double>(matched_tracks) / (total_tracks > 0 ? total_tracks : 1);
......
......@@ -82,8 +82,8 @@ namespace corryvreckan {
double last_track_timestamp = 0;
double last_track_col = 0.;
double last_track_row = 0.;
double n_track = 0, n_chi2 = 0, n_dut = 0, n_roi = 0, n_masked = 0, n_frameedge = 0, n_requiredet = 0;
std::vector<std::string> require_detectors_;
double n_track = 0, n_chi2 = 0, n_dut = 0, n_roi = 0, n_masked = 0, n_frameedge = 0, n_requirecluster = 0;
std::vector<std::string> require_associated_cluster_on_;
Matrix<double> prev_hit_ts; // matrix containing previous hit timestamp for every pixel
};
......
......@@ -19,7 +19,7 @@ More information can be found in the ROOT `TEfficiency` class reference, section
* `time_cut_frameedge`: Parameter to discard telescope tracks at the frame edges (start and end of the current event window). Defaults to `20ns`.
* `chi2ndof_cut`: Acceptance criterion for telescope tracks, defaults to a value of `3`.
* `inpixel_bin_size`: Parameter to set the bin size of the in-pixel 2D efficiency histogram. This should be given in units of distance and the same value is used in both axes. Defaults to `1.0um`.
* `require_detectors`: Names of detectors which are required to have an associated cluster to the telescope tracks. Only tracks satisfying this requirement are accepted for the efficiency measurement. If empty, no detector is required. Default is empty.
* `require_associated_cluster_on`: Names of detectors which are required to have an associated cluster to the telescope tracks. Only tracks satisfying this requirement are accepted for the efficiency measurement. If empty, no detector is required. Default is empty.
### Plots produced
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment