Commit 79bbb4ca authored by Lennart Huth's avatar Lennart Huth
Browse files

Merge remote-tracking branch 'corry/master' into fix_m26pivot

parents 51828e44 c54fdfbd
Pipeline #2753854 failed with stages
in 29 minutes and 2 seconds
......@@ -419,6 +419,54 @@ void AnalysisDUT::initialize() {
-pitch_y / 2.,
pitch_y / 2.);
title = "Mean cluster charge map (1-pixel);" + mod_axes + "<cluster charge> [ke]";
qvsxmym_1px = new TProfile2D("qvsxmym_1px",
title.c_str(),
static_cast<int>(pitch_x),
-pitch_x / 2.,
pitch_x / 2.,
static_cast<int>(pitch_y),
-pitch_y / 2.,
pitch_y / 2.,
0,
250);
title = "Mean cluster charge map (2-pixel);" + mod_axes + "<cluster charge> [ke]";
qvsxmym_2px = new TProfile2D("qvsxmym_2px",
title.c_str(),
static_cast<int>(pitch_x),
-pitch_x / 2.,
pitch_x / 2.,
static_cast<int>(pitch_y),
-pitch_y / 2.,
pitch_y / 2.,
0,
250);
title = "Mean cluster charge map (3-pixel);" + mod_axes + "<cluster charge> [ke]";
qvsxmym_3px = new TProfile2D("qvsxmym_3px",
title.c_str(),
static_cast<int>(pitch_x),
-pitch_x / 2.,
pitch_x / 2.,
static_cast<int>(pitch_y),
-pitch_y / 2.,
pitch_y / 2.,
0,
250);
title = "Mean cluster charge map (4-pixel);" + mod_axes + "<cluster charge> [ke]";
qvsxmym_4px = new TProfile2D("qvsxmym_4px",
title.c_str(),
static_cast<int>(pitch_x),
-pitch_x / 2.,
pitch_x / 2.,
static_cast<int>(pitch_y),
-pitch_y / 2.,
pitch_y / 2.,
0,
250);
residualsTime = new TH1F("residualsTime",
"Time residual;time_{track}-time_{hit} [ns];#entries",
n_timebins_,
......@@ -634,8 +682,8 @@ StatusCode AnalysisDUT::run(const std::shared_ptr<Clipboard>& clipboard) {
// Calculate in-pixel position of track in microns
auto inpixel = m_detector->inPixel(localIntercept);
auto xmod = inpixel.X() * 1000.; // convert mm -> um
auto ymod = inpixel.Y() * 1000.; // convert mm -> um
auto xmod_um = inpixel.X() * 1000.; // convert mm -> um
auto ymod_um = inpixel.Y() * 1000.; // convert mm -> um
// Loop over all associated DUT clusters:
for(auto assoc_cluster : track->getAssociatedClusters(m_detector->getName())) {
......@@ -752,11 +800,11 @@ StatusCode AnalysisDUT::run(const std::shared_ptr<Clipboard>& clipboard) {
clusterWidthColAssoc->Fill(static_cast<double>(assoc_cluster->columnWidth()));
// Fill in-pixel plots: (all as function of track position within pixel cell)
qvsxmym->Fill(xmod, ymod, cluster_charge); // cluster charge profile
qMoyalvsxmym->Fill(xmod, ymod, exp(-normalized_charge / 3.5)); // norm. cluster charge profile
qvsxmym->Fill(xmod_um, ymod_um, cluster_charge); // cluster charge profile
qMoyalvsxmym->Fill(xmod_um, ymod_um, exp(-normalized_charge / 3.5)); // norm. cluster charge profile
// mean charge of cluster seed
pxqvsxmym->Fill(xmod, ymod, assoc_cluster->getSeedPixel()->charge());
pxqvsxmym->Fill(xmod_um, ymod_um, assoc_cluster->getSeedPixel()->charge());
if(assoc_cluster->size() > 1) {
for(auto& px : assoc_cluster->pixels()) {
......@@ -790,20 +838,28 @@ StatusCode AnalysisDUT::run(const std::shared_ptr<Clipboard>& clipboard) {
}
// mean cluster size
npxvsxmym->Fill(xmod, ymod, static_cast<double>(assoc_cluster->size()));
if(assoc_cluster->size() == 1)
npx1vsxmym->Fill(xmod, ymod);
if(assoc_cluster->size() == 2)
npx2vsxmym->Fill(xmod, ymod);
if(assoc_cluster->size() == 3)
npx3vsxmym->Fill(xmod, ymod);
if(assoc_cluster->size() == 4)
npx4vsxmym->Fill(xmod, ymod);
npxvsxmym->Fill(xmod_um, ymod_um, static_cast<double>(assoc_cluster->size()));
if(assoc_cluster->size() == 1) {
npx1vsxmym->Fill(xmod_um, ymod_um);
qvsxmym_1px->Fill(xmod_um, ymod_um, cluster_charge);
}
if(assoc_cluster->size() == 2) {
npx2vsxmym->Fill(xmod_um, ymod_um);
qvsxmym_2px->Fill(xmod_um, ymod_um, cluster_charge);
}
if(assoc_cluster->size() == 3) {
npx3vsxmym->Fill(xmod_um, ymod_um);
qvsxmym_3px->Fill(xmod_um, ymod_um, cluster_charge);
}
if(assoc_cluster->size() == 4) {
npx4vsxmym->Fill(xmod_um, ymod_um);
qvsxmym_4px->Fill(xmod_um, ymod_um, cluster_charge);
}
// residual MAD x, y, combined (sqrt(x*x + y*y))
rmsxvsxmym->Fill(xmod, ymod, xabsdistance);
rmsyvsxmym->Fill(xmod, ymod, yabsdistance);
rmsxyvsxmym->Fill(xmod, ymod, fabs(sqrt(xdistance * xdistance + ydistance * ydistance)));
rmsxvsxmym->Fill(xmod_um, ymod_um, xabsdistance);
rmsyvsxmym->Fill(xmod_um, ymod_um, yabsdistance);
rmsxyvsxmym->Fill(xmod_um, ymod_um, fabs(sqrt(xdistance * xdistance + ydistance * ydistance)));
hAssociatedTracksGlobalPosition->Fill(globalIntercept.X(), globalIntercept.Y());
hAssociatedTracksLocalPosition->Fill(m_detector->getColumn(localIntercept), m_detector->getRow(localIntercept));
......
......@@ -74,6 +74,7 @@ namespace corryvreckan {
TProfile2D *rmsxvsxmym, *rmsyvsxmym, *rmsxyvsxmym;
TProfile2D *qvsxmym, *qMoyalvsxmym, *pxqvsxmym;
TProfile2D *qvsxmym_1px, *qvsxmym_2px, *qvsxmym_3px, *qvsxmym_4px;
TProfile2D* npxvsxmym;
TH2F *npx1vsxmym, *npx2vsxmym, *npx3vsxmym, *npx4vsxmym;
......
......@@ -23,14 +23,14 @@ 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>("inpixel_cut_edge", Units::get<double>(5., "um"));
config_.setDefault<XYVector>("inpixel_cut_edge", {Units::get(5.0, "um"), Units::get(5.0, "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>("inpixel_cut_edge");
m_inpixelEdgeCut = config_.get<XYVector>("inpixel_cut_edge");
m_maskedPixelDistanceCut = config_.get<int>("masked_pixel_distance_cut");
}
......@@ -74,6 +74,19 @@ void AnalysisEfficiency::initialize() {
-pitch_y / 2.,
pitch_y / 2.);
title = m_detector->getName() +
" Pixel efficiency map (in-pixel ROI);in-pixel x_{track} [#mum];in-pixel y_{track} #mum;#epsilon";
hPixelEfficiencyMap_inPixelROI_trackPos_TProfile = new TProfile2D("pixelEfficiencyMap_inPixelROI_trackPos_TProfile",
title.c_str(),
nbins_x,
-pitch_x / 2.,
pitch_x / 2.,
nbins_y,
-pitch_y / 2.,
pitch_y / 2.,
0,
1);
title = m_detector->getName() + " Chip efficiency map;x [px];y [px];#epsilon";
hChipEfficiencyMap_trackPos_TProfile = new TProfile2D("chipEfficiencyMap_trackPos_TProfile",
title.c_str(),
......@@ -180,6 +193,8 @@ void AnalysisEfficiency::initialize() {
-1.5 * m_detector->getPitch().y(),
1.5 * m_detector->getPitch().y());
eTotalEfficiency = new TEfficiency("eTotalEfficiency", "totalEfficiency;;#epsilon", 1, 0, 1);
eTotalEfficiency_inPixelROI = new TEfficiency(
"eTotalEfficiency_inPixelROI", "eTotalEfficiency_inPixelROI;;#epsilon (within in-pixel ROI)", 1, 0, 1);
efficiencyColumns = new TEfficiency("efficiencyColumns",
"Efficiency vs. column number; column; #epsilon",
......@@ -268,8 +283,8 @@ 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"));
auto pitch_x = m_detector->getPitch().X();
auto pitch_y = m_detector->getPitch().Y();
// Loop over all tracks
for(auto& track : tracks) {
......@@ -353,8 +368,13 @@ StatusCode AnalysisEfficiency::run(const std::shared_ptr<Clipboard>& clipboard)
// Calculate in-pixel position of track in microns
auto inpixel = m_detector->inPixel(localIntercept);
auto xmod = static_cast<double>(Units::convert(inpixel.X(), "um"));
auto ymod = static_cast<double>(Units::convert(inpixel.Y(), "um"));
auto xmod = inpixel.X();
auto ymod = inpixel.Y();
auto xmod_um = xmod * 1000.; // mm->um (for plotting)
auto ymod_um = ymod * 1000.; // mm->um (for plotting)
bool isWithinInPixelROI =
(pitch_x - abs(xmod * 2) > m_inpixelEdgeCut.x()) && (pitch_y - abs(ymod * 2) > m_inpixelEdgeCut.y());
// Get the DUT clusters from the clipboard, that are assigned to the track
auto associated_clusters = track->getAssociatedClusters(m_detector->getName());
......@@ -366,8 +386,10 @@ 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))) &&
(pitch_x - abs(xmod * 2) < m_inpixelEdgeCut || pitch_y - abs(ymod * 2) < m_inpixelEdgeCut))
isWithinInPixelROI) {
hPixelEfficiencyMatrix_TProfile->Fill(pixel->column(), pixel->row(), 1);
break; // There cannot be a second pixel within the cluster through which the track goes.
}
}
auto clusterLocal = m_detector->globalToLocal(cluster->global());
......@@ -387,10 +409,10 @@ StatusCode AnalysisEfficiency::run(const std::shared_ptr<Clipboard>& clipboard)
has_associated_cluster, m_detector->getColumn(clusterLocal), m_detector->getRow(clusterLocal));
}
if(!has_associated_cluster &&
(pitch_x - abs(xmod * 2) < m_inpixelEdgeCut || pitch_y - abs(ymod * 2) < m_inpixelEdgeCut))
if(!has_associated_cluster && isWithinInPixelROI) {
hPixelEfficiencyMatrix_TProfile->Fill(
m_detector->getColumn(localIntercept), m_detector->getRow(localIntercept), 0);
}
hGlobalEfficiencyMap_trackPos_TProfile->Fill(globalIntercept.X(), globalIntercept.Y(), has_associated_cluster);
hGlobalEfficiencyMap_trackPos->Fill(has_associated_cluster, globalIntercept.X(), globalIntercept.Y());
......@@ -402,12 +424,17 @@ StatusCode AnalysisEfficiency::run(const std::shared_ptr<Clipboard>& clipboard)
// For pixels, only look at the ROI:
if(is_within_roi) {
hPixelEfficiencyMap_trackPos_TProfile->Fill(xmod, ymod, has_associated_cluster);
hPixelEfficiencyMap_trackPos->Fill(has_associated_cluster, xmod, ymod);
hPixelEfficiencyMap_trackPos_TProfile->Fill(xmod_um, ymod_um, has_associated_cluster);
hPixelEfficiencyMap_trackPos->Fill(has_associated_cluster, xmod_um, ymod_um);
eTotalEfficiency->Fill(has_associated_cluster, 0); // use 0th bin for total efficiency
efficiencyColumns->Fill(has_associated_cluster, m_detector->getColumn(localIntercept));
efficiencyRows->Fill(has_associated_cluster, m_detector->getRow(localIntercept));
efficiencyVsTime->Fill(has_associated_cluster, track->timestamp() / 1e9); // convert nanoseconds to seconds
if(isWithinInPixelROI) {
hPixelEfficiencyMap_inPixelROI_trackPos_TProfile->Fill(xmod_um, ymod_um, has_associated_cluster);
eTotalEfficiency_inPixelROI->Fill(has_associated_cluster, 0); // use 0th bin for total efficiency
}
}
auto intercept_col = static_cast<size_t>(m_detector->getColumn(localIntercept));
......@@ -480,8 +507,11 @@ void AnalysisEfficiency::finalize(const std::shared_ptr<ReadonlyClipboard>&) {
<< "Accepted tracks: " << total_tracks;
double totalEff = 100 * static_cast<double>(matched_tracks) / (total_tracks > 0 ? total_tracks : 1);
LOG(STATUS) << "Total efficiency of detector " << m_detector->getName() << ": " << totalEff << "%, measured with "
<< matched_tracks << "/" << total_tracks << " matched/total tracks";
double lowerEffError = totalEff - 100 * (TEfficiency::ClopperPearson(total_tracks, matched_tracks, 0.683, false));
double upperEffError = 100 * (TEfficiency::ClopperPearson(total_tracks, matched_tracks, 0.683, true)) - totalEff;
LOG(STATUS) << "Total efficiency of detector " << m_detector->getName() << ": " << totalEff << "(+" << upperEffError
<< " -" << lowerEffError << ")%, measured with " << matched_tracks << "/" << total_tracks
<< " matched/total tracks";
for(int icol = 1; icol < m_detector->nPixels().X() + 1; icol++) {
for(int irow = 1; irow < m_detector->nPixels().Y() + 1; irow++) {
......
......@@ -48,6 +48,7 @@ namespace corryvreckan {
// Profile version
TProfile2D* hPixelEfficiencyMap_trackPos_TProfile;
TProfile2D* hPixelEfficiencyMap_inPixelROI_trackPos_TProfile;
TProfile2D* hChipEfficiencyMap_trackPos_TProfile;
TProfile2D* hPixelEfficiencyMatrix_TProfile;
TProfile2D* hGlobalEfficiencyMap_trackPos_TProfile;
......@@ -61,6 +62,7 @@ namespace corryvreckan {
TEfficiency* hGlobalEfficiencyMap_clustPos;
TEfficiency* eTotalEfficiency;
TEfficiency* eTotalEfficiency_inPixelROI;
TEfficiency* efficiencyColumns;
TEfficiency* efficiencyRows;
TEfficiency* efficiencyVsTime;
......@@ -78,7 +80,8 @@ namespace corryvreckan {
TH2D* hPosDiffPrevTrack_assocCluster;
TH2D* hPosDiffPrevTrack_noAssocCluster;
TH2D* hDistanceCluster_track;
double m_chi2ndofCut, m_timeCutFrameEdge, m_inpixelBinSize, m_inpixelEdgeCut;
double m_chi2ndofCut, m_timeCutFrameEdge, m_inpixelBinSize;
XYVector m_inpixelEdgeCut;
int m_maskedPixelDistanceCut = 1;
int total_tracks = 0;
int matched_tracks = 0;
......
......@@ -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`.
* `inpixel_cut_edge`: Parameter to exclude tracks going within a cut-distance to the pixel edge. Defaults to `5um`.
* `inpixel_cut_edge`: Parameter to exclude tracks going within a cut-distance to the pixel edge. Effectively defines an in-pixel ROI. 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.
......@@ -28,9 +28,9 @@ More information can be found in the ROOT `TEfficiency` class reference, section
For the DUT, the following plots are produced:
* 2D histograms:
* 2D Map of in-pixel efficiency
* 2D Map of in-pixel efficiency and in-pixel efficiency within in-pixel ROI
* 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, for the full matrix, filled at the pixel (of the associated cluster) through which the track goes, constrained to an inpixel-ROI defined by `inpixel_cut_edge`.
* 2D Map of pixel efficiency, for the full matrix, filled at the pixel (of the associated cluster) through which the track goes, constrained to an in-pixel 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
......@@ -42,7 +42,7 @@ For the DUT, the following plots are produced:
* Distribution of cluster-track distances
* Other:
* Value of total efficiency as `TEfficiency` including (asymmetric) error bars
* Value of total efficiency as `TEfficiency` including (asymmetric) error bars (total and restricted to in-pixel ROI)
* Efficiency as function of column and row, and vs. time
......
/**
* @file
* @brief Implementation of module AnalysisTracks
*
* @copyright Copyright (c) 2020 CERN and the Corryvreckan authors.
* This software is distributed under the terms of the MIT License, copied verbatim in the file "LICENSE.md".
* In applying this license, CERN does not waive the privileges and immunities granted to it by virtue of its status as an
* Intergovernmental Organization or submit itself to any jurisdiction.
*/
#include "AnalysisTracks.h"
using namespace corryvreckan;
AnalysisTracks::AnalysisTracks(Configuration& config, std::vector<std::shared_ptr<Detector>> detectors)
: Module(config, std::move(detectors)) {}
void AnalysisTracks::initialize() {
std::string title;
for(auto& detector : get_detectors()) {
if(detector->isAuxiliary()) {
continue;
}
LOG(DEBUG) << "Initialise for detector " + detector->getName();
TDirectory* directory = getROOTDirectory();
TDirectory* local_directory = directory->mkdir(detector->getName().c_str());
if(local_directory == nullptr) {
throw RuntimeError("Cannot create or access local ROOT directory for module " + this->getUniqueName());
}
local_directory->cd();
title = "Distance between tracks ; distance [mm]; entries";
_distance_between_tracks_[detector->getName().c_str()] = new TH1F("distance_tracks", title.c_str(), 1000, 0, 10);
title = "Tracks with same hits ; # tracks with same hit; entries";
_tracks_per_hit_[detector->getName().c_str()] = new TH1F("number_tracks_with same hit", title.c_str(), 15, 0, 15);
title = "Cluster vs tracks ; # tracks; #clusters";
clusters_vs_tracks_[detector->getName().c_str()] =
new TH2F("clusters_vs_tracks", title.c_str(), 25, 0, 25, 200, 0, 200);
}
}
StatusCode AnalysisTracks::run(const std::shared_ptr<Clipboard>& clipboard) {
auto tracks = clipboard->getData<Track>();
if(!tracks.size()) {
return StatusCode::Success;
}
for(auto d : get_detectors()) {
if(d->isAuxiliary()) {
continue;
}
clusters_vs_tracks_.at(d->getName())
->Fill(static_cast<double>(tracks.size()),
static_cast<double>(clipboard->getData<Cluster>(d->getName()).size()));
}
// Loop over all tracks and get clusters assigned to tracks as well as the intersections
std::map<std::string, std::map<std::pair<double, double>, int>> track_clusters;
std::map<std::string, std::vector<XYZPoint>> intersects; // local coordinates
for(auto& track : tracks) {
for(auto d : get_detectors()) {
if(d->isAuxiliary()) {
continue;
}
intersects[d->getName()].push_back(d->globalToLocal(track->getState(d->getName())));
if(d->isDUT() || track->getClusterFromDetector(d->getName()) == nullptr) {
continue;
}
auto c = track->getClusterFromDetector(d->getName());
track_clusters[d->getName()][std::make_pair<double, double>(c->column(), c->row())] += 1;
}
}
// Now fill the histos
for(auto const& intersect : intersects) {
auto key = intersect.first;
auto val = intersect.second;
for(uint i = 0; i < val.size(); ++i) {
auto j = i + 1;
while(j < val.size()) {
auto p = val.at(i) - val.at(j);
_distance_between_tracks_.at(key)->Fill((p.Mag2()));
j++;
}
}
}
for(auto const& track_cluster : track_clusters) {
auto key = track_cluster.first;
for(auto const& v : track_cluster.second) {
_tracks_per_hit_.at(key)->Fill(v.second);
}
}
// Return value telling analysis to keep running
return StatusCode::Success;
}
/**
* @file
* @brief Definition of module AnalysisTracks
*
* @copyright Copyright (c) 2020 CERN and the Corryvreckan authors.
* This software is distributed under the terms of the MIT License, copied verbatim in the file "LICENSE.md".
* In applying this license, CERN does not waive the privileges and immunities granted to it by virtue of its status as an
* Intergovernmental Organization or submit itself to any jurisdiction.
*/
#ifndef ANALYSISTRACKS_H
#define ANALYSISTRACKS_H 1
#include <TCanvas.h>
#include <TH1F.h>
#include <TH2F.h>
#include <iostream>
#include "core/module/Module.hpp"
#include "objects/Cluster.hpp"
#include "objects/Pixel.hpp"
#include "objects/Track.hpp"
namespace corryvreckan {
/** @ingroup Modules
* @brief Module to do function
*
* More detailed explanation of module
*/
class AnalysisTracks : public Module {
public:
/**
* @brief Constructor for this unique module
* @param config Configuration object for this module as retrieved from the steering file
* @param detectors Vector of pointers to the detectors
*/
AnalysisTracks(Configuration& config, std::vector<std::shared_ptr<Detector>> detectors);
~AnalysisTracks() {}
/**
* @brief [Initialise this module]
*/
void initialize() override;
/**
* @brief [Run the function of this module]
*/
StatusCode run(const std::shared_ptr<Clipboard>& clipboard) override;
private:
std::map<std::string, TH1F*> _distance_between_tracks_{};
std::map<std::string, TH1F*> _tracks_per_hit_{};
std::map<std::string, TH2F*> clusters_vs_tracks_{};
};
} // namespace corryvreckan
#endif // ANALYSISTRACKS_H
CORRYVRECKAN_ENABLE_DEFAULT(ON)
# Define module and return the generated name as MODULE_NAME
CORRYVRECKAN_GLOBAL_MODULE(MODULE_NAME)
# Add source files to library
CORRYVRECKAN_MODULE_SOURCES(${MODULE_NAME}
AnalysisTracks.cpp
# ADD SOURCE FILES HERE...
)
# Provide standard install target
CORRYVRECKAN_MODULE_INSTALL(${MODULE_NAME})
# AnalysisTracks
**Maintainer**: Lennart Huth (lennart.huth@desy.de)
**Module Type**: *GLOBAL*
**Status**: Functional
### Description
Study reconstructed tracks in each event by calculating the distance between
tracks in an event. In addition cluster assignments to multiple tracks is
plotted. Finally the number of tracks is correlated with the number of tracks
reconstructed.
### Parameters
No parameters are used from the configuration file.
### Plots produced
For each detector the following plots are produced:
* 2D histogram of number of tracks versus clusters
* 1D histogram of absolute distance between tracks
* 1D histogram of number of times a cluster is used in a track
### Usage
```toml
[AnalysisTracks]
```
......@@ -28,7 +28,7 @@ FUNCTION(ESCAPE_REGEX INP OUTPUT)
# Escape possible regex patterns in the expected output:
STRING(REPLACE "#PASS " "" _TMP_STR "${INP}")
STRING(REPLACE "#FAIL " "" _TMP_STR "${_TMP_STR}")
STRING(REGEX REPLACE "([][+.*()^])" "\\\\\\1" _TMP_STR "${_TMP_STR}")
STRING(REGEX REPLACE "([][+-.*()^])" "\\\\\\1" _TMP_STR "${_TMP_STR}")
SET(${OUTPUT} "${_TMP_STR}" PARENT_SCOPE)
ENDFUNCTION()
......
......@@ -19,10 +19,11 @@ time_cut_frameedge = 10ns
#DEPENDS test_io_write_rootobj.conf
#PASS Total efficiency of detector W0013_G02: 100%, measured with 34446/34446 matched/total tracks
#PASS Total efficiency of detector W0013_G02: 100(+0 -0.00534736)%, measured with 34446/34446 matched/total tracks
# Please note:
# Pixels are masked in the [EventLoaderTimepix3] when reading in the online configuration files.
# Therefore, no pixels are masked here and the number of associated tracks is slightly higher than
# in "test_io_write_obj.conf":
#
# Total efficiency of detector W0013_G02: 100%, measured with 31816/31816 matched/total tracks
#Total efficiency of detector W0013_G02: 100(+0 -0.00534736)%, measured with 34446/34446 matched/total tracks
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