Commit fb7a0695 authored by Mateus Vicente's avatar Mateus Vicente
Browse files

Apply remaining suggestions to 2 files

parent 27b07f60
......@@ -23,15 +23,15 @@ AnalysisEfficiency::AnalysisEfficiency(Configuration& config, std::shared_ptr<De
config_.setDefault<double>("time_cut_frameedge", Units::get<double>(20, "ns"));
config_.setDefault<double>("chi2ndof_cut", 3.);
config_.setDefault<double>("inpixel_bin_size", Units::get<double>(1.0, "um"));
config_.setDefault<double>("inpixelEdge_cut", Units::get<double>(5.,"um");
config_.setDefault<double>("maskedPixelDistance_cut", 1.);
config_.setDefault<double>("inpixel_cut_edge", Units::get<double>(5.,"um");
config_.setDefault<double>("masked_pixel_distance_cut", 1.);
m_timeCutFrameEdge = config_.get<double>("time_cut_frameedge");
m_chi2ndofCut = config_.get<double>("chi2ndof_cut");
m_inpixelBinSize = config_.get<double>("inpixel_bin_size");
require_associated_cluster_on_ = config_.getArray<std::string>("require_associated_cluster_on", {});
m_inpixelEdgeCut = config_.get<double>("inpixelEdge_cut");
m_maskedPixelDistanceCut = config_.get<int>("maskedPixelDistance_cut");
m_inpixelEdgeCut = config_.get<double>("inpixel_cut_edge");
m_maskedPixelDistanceCut = config_.get<int>("masked_pixel_distance_cut");
}
void AnalysisEfficiency::initialize() {
......@@ -267,6 +267,9 @@ StatusCode AnalysisEfficiency::run(const std::shared_ptr<Clipboard>& clipboard)
// Get the telescope tracks from the clipboard
auto tracks = clipboard->getData<Track>();
auto pitch_x = static_cast<double>(Units::convert(m_detector->getPitch().X(), "um"));
auto pitch_y = static_cast<double>(Units::convert(m_detector->getPitch().Y(), "um"));
// Loop over all tracks
for(auto& track : tracks) {
n_track++;
......@@ -362,7 +365,7 @@ StatusCode AnalysisEfficiency::run(const std::shared_ptr<Clipboard>& clipboard)
for(auto& pixel : pixels) {
if((pixel->column() == static_cast<int>(m_detector->getColumn(localIntercept)) &&
pixel->row() == static_cast<int>(m_detector->getRow(localIntercept))) &&
(55 - abs(xmod * 2) < m_inpixelEdgeCut || 55 - abs(ymod * 2) < m_inpixelEdgeCut))
(pitch_x - abs(xmod * 2) < m_inpixelEdgeCut || pitch_y - abs(ymod * 2) < m_inpixelEdgeCut))
hPixelEfficiencyMatrix_TProfile->Fill(pixel->column(), pixel->row(), 1);
}
......@@ -383,7 +386,8 @@ StatusCode AnalysisEfficiency::run(const std::shared_ptr<Clipboard>& clipboard)
has_associated_cluster, m_detector->getColumn(clusterLocal), m_detector->getRow(clusterLocal));
}
if(!has_associated_cluster && (55 - abs(xmod * 2) < m_inpixelEdgeCut || 55 - abs(ymod * 2) < m_inpixelEdgeCut))
if(!has_associated_cluster &&
(pitch_x - abs(xmod * 2) < m_inpixelEdgeCut || pitch_y - abs(ymod * 2) < m_inpixelEdgeCut))
hPixelEfficiencyMatrix_TProfile->Fill(
m_detector->getColumn(localIntercept), m_detector->getRow(localIntercept), 0);
......
......@@ -19,8 +19,8 @@ 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`.
* `inpixelEdge_cut`: Parameter to exclude tracks going within a cut-distance to the pixel edge. Defaults to `5um`.
* `maskedPixelDistance_cut`: Distance (in pixels) to exclude tracks passing close to masked pixel. Defaults to `1`.
* `inpixel_cut_edge`: Parameter to exclude tracks going within a cut-distance to the pixel edge. Defaults to `5um`.
* `masked_pixel_distance_cut`: Distance (in pixels) to exclude tracks passing close to masked pixel. Defaults to `1`.
* `require_associated_cluster_on`: Names of detectors which are required to have an associated cluster to the telescope tracks. Detectors listed here must be marked as `role = DUT` in the detector configuration file. Only tracks satisfying this requirement are accepted for the efficiency measurement. If empty, no detector is required. Default is empty.
### Plots produced
......@@ -30,7 +30,7 @@ For the DUT, the following plots are produced:
* 2D histograms:
* 2D Map of in-pixel efficiency
* 2D Maps of chip efficiency in local and global coordinates, filled at the position of the track intercept point or at the position of the associated cluster center
* 2D Map of pixel efficiency, filled at the associated cluster pixel level, constrained to tracks passing through a ROI (defined by `inpixelEdge_cut`) of the given pixel.
* 2D Map of pixels efficiency, for the full matrix, filled at the pixel (of the associated cluster) for which the track goes through, constrained to an inpixel-ROI defined by `inpixel_cut_edge`.
* 2D Maps of the position difference of a track with and without associated cluster to the previous track
* 2D Map of the distance between track intersection and associated cluster
......
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