Commit 8a9fa957 authored by Morag Jean Williams's avatar Morag Jean Williams
Browse files

Merge branch 'unify_configkeys' into 'master'

Unify Configuration Keys

Closes #46

See merge request !81
parents 98dd6f1f 582cfa5a
Pipeline #652109 passed with stages
in 17 minutes and 55 seconds
......@@ -4,27 +4,25 @@
**Status**: Functional
### Description
This module reads in an input file containing trees with data previously written out by the `FileWriter`. The read in objects are stored on the clipboard. It reads in `pixel`, `cluster`, `track`, and/or `MCparticle` objects.
This module reads in an input file containing trees with data previously written out by the `FileWriter`. The read in objects are stored on the clipboard. It reads in `pixel`, `cluster`, `track`, and/or `MCParticle` objects.
### Parameters
* `onlyDUT`: Boolean to decide if data is read in from only the DUT. Default value is `false`.
* `readPixels`: Boolean to choose if pixel objects are to be read in. Default value is `true`.
* `readClusters`: Boolean to choose if cluster objects are to be read in. Default value is `false`.
* `readTracks`: Boolean to choose if track objects are to be read in. Default value is `false`.
* `readMCParticles`: Boolean to choose if Monte-Carlo particle objects are to be read in. Default value is `false`.
* `fileName`: Name of the file from which data will be read.
* `timeWindow`: Data with time lower than this value will be read in. Default value is `1s`.
* `DUT`: Name of the DUT plane.
* `only_dut`: Boolean to decide if data is read in from only the DUT. Default value is `false`.
* `read_pixels`: Boolean to choose if pixel objects are to be read in. Default value is `true`.
* `read_clusters`: Boolean to choose if cluster objects are to be read in. Default value is `false`.
* `read_tracks`: Boolean to choose if track objects are to be read in. Default value is `false`.
* `read_mcparticles`: Boolean to choose if Monte-Carlo particle objects are to be read in. Default value is `false`.
* `file_name`: Name of the file from which data will be read.
* `time_window`: Data with time lower than this value will be read in. Default value is `1s`.
### Usage
```toml
[FileReader]
onlyDUT = true
readPixels = true
readClusters = true
readTracks = false
readMCParticles = true
fileName = "input_file.root"
timeWindow = 1
DUT = "W0005_H03"
only_dut = true
read_pixels = true
read_clusters = true
read_tracks = false
read_mcparticles = true
file_name = "input_file.root"
time_window = 1
```
......@@ -7,11 +7,11 @@ using namespace std;
FileWriter::FileWriter(Configuration config, std::vector<std::shared_ptr<Detector>> detectors)
: Module(std::move(config), std::move(detectors)) {
m_onlyDUT = m_config.get<bool>("onlyDUT", true);
m_writePixels = m_config.get<bool>("writePixels", true);
m_writeClusters = m_config.get<bool>("writeClusters", false);
m_writeTracks = m_config.get<bool>("writeTracks", true);
m_fileName = m_config.get<std::string>("fileName", "outputTuples.root");
m_onlyDUT = m_config.get<bool>("only_dut", true);
m_writePixels = m_config.get<bool>("write_pixels", true);
m_writeClusters = m_config.get<bool>("write_clusters", false);
m_writeTracks = m_config.get<bool>("write_tracks", true);
m_fileName = m_config.get<std::string>("file_name", "outputTuples.root");
}
/*
......
......@@ -7,20 +7,18 @@
This module writes an output file and fills it with trees containing the requested data objects. `Pixel`, `cluster`, and/or `track` objects can be written into the trees.
### Parameters
* `DUT`: Name of the DUT plane.
* `onlyDUT`: Boolean to decide if only the DUT data is to be written into the outputfile, or if all planes are to be. Default value is `true`. If no `DUT` parameter is set in the configuration file, this parameter is automatically `false`.
* `writePixels`: Boolean to choose if pixel objects are to be written out. Default value is `true`.
* `writeClusters`: Boolean to choose if cluster objects are to be written out. Default value is `false`.
* `writeTracks`: Boolean to choose if track objects are to be written out. Default value is `true`.
* `fileName`: Name of the data file to create, relative to the output directory of the framework. The file extension `.root` will be appended if not present. Default value is `outputTuples.root`.
* `only_dut`: Boolean to decide if only the DUT data is to be written into the outputfile, or if all planes are to be. Default value is `true`.
* `write_pixels`: Boolean to choose if pixel objects are to be written out. Default value is `true`.
* `write_clusters`: Boolean to choose if cluster objects are to be written out. Default value is `false`.
* `write_tracks`: Boolean to choose if track objects are to be written out. Default value is `true`.
* `file_name`: Name of the data file to create, relative to the output directory of the framework. The file extension `.root` will be appended if not present. Default value is `outputTuples.root`.
### Usage
```toml
[FileWriter]
DUT = "W000_H03"
onlyDUT = false
writePixels = true
writeClusters = true
writeTracks = true
fileName = "output.root"
only_dut = false
write_pixels = true
write_clusters = true
write_tracks = true
file_name = "output.root"
```
......@@ -6,9 +6,9 @@ using namespace std;
ImproveReferenceTimestamp::ImproveReferenceTimestamp(Configuration config, std::vector<std::shared_ptr<Detector>> detectors)
: Module(std::move(config), std::move(detectors)) {
m_method = m_config.get<int>("improvementMethod", 1);
m_source = m_config.get<std::string>("signalSource", "W0013_G02");
m_triggerLatency = m_config.get<double>("triggerLatency", static_cast<double>(Units::convert(0, "ns")));
m_method = m_config.get<int>("improvement_method", 1);
m_source = m_config.get<std::string>("signal_source", "W0013_G02");
m_triggerLatency = m_config.get<double>("trigger_latency", static_cast<double>(Units::convert(0, "ns")));
}
void ImproveReferenceTimestamp::initialise() {
......
......@@ -7,14 +7,14 @@
Replaces the existing reference timestamp (earliest hit on reference plane) by either the trigger timestamp (method 0) or the average track timestamp (method 1). For method 0 to work, a trigger timestamp has to be saved as SPIDR signal during data taking.
### Parameters
* `improvementMethod`: Determines which method to use. Trigger timestamp is 0, average track timestamp is 1. Default value is `1`.
* `signalSource`: Determines which detector plane carries the trigger signals. Only relevant for method 0. Default value is `"W0013_G02"`.
* `triggerLatency`: Adds a latency to the trigger timestamp and shifts time histogrammes back to zero. Default value is `0`.
* `improvement_method`: Determines which method to use. Trigger timestamp is 0, average track timestamp is 1. Default value is `1`.
* `signal_source`: Determines which detector plane carries the trigger signals. Only relevant for method 0. Default value is `"W0013_G02"`.
* `trigger_latency`: Adds a latency to the trigger timestamp and shifts time histogrammes back to zero. Default value is `0`.
### Usage
```toml
[ImproveReferenceTimestamp]
improvementMethod = 0
signalSource = "W0013_G02"
triggerLatency = 20ns
improvement_method = 0
signal_source = "W0013_G02"
trigger_latency = 20ns
```
......@@ -11,7 +11,7 @@ MaskCreator::MaskCreator(Configuration config, std::shared_ptr<Detector> detecto
m_frequency = m_config.get<double>("frequency_cut", 50);
binsOccupancy = m_config.get<int>("binsOccupancy", 128);
binsOccupancy = m_config.get<int>("bins_occupancy", 128);
bandwidth = m_config.get<double>("density_bandwidth", 2.);
m_sigmaMax = m_config.get<double>("sigma_above_avg_max", 5.);
m_rateMax = m_config.get<double>("rate_max", 1.);
......
......@@ -16,7 +16,7 @@ The module writes new mask file with all masked pixels for each device. Already
### Parameters
* `method`: Select the method to evaluate noisy pixels. Can be either `localdensity` or `frequency`, where the latter is chosen by default.
* `frequency_cut`: Frequency threshold to declare a pixel as noisy, defaults to 50. This means, if a pixel exhibits 50 times more hits than the average pixel on the sensor, it is considered noisy and is masked. Only used in `frequency` mode.
* `binsOccupancy`: Number of bins for occupancy distribution histograms, defaults to 128.
* `bins_occupancy`: Number of bins for occupancy distribution histograms, defaults to 128.
* `density_bandwidth`: Bandwidth for local density estimator, defaults to `2` and is only used in `localdensity` mode.
* `sigma_above_avg_max`: Cut for noisy pixels, sigma above average, defaults to `5`. Only used in `localdensity` mode.
* `rate_max`: Maximum rate, defaults to `1`. Only used in `localdensity` mode.
......
......@@ -6,7 +6,7 @@ using namespace std;
Metronome::Metronome(Configuration config, std::vector<std::shared_ptr<Detector>> detectors)
: Module(std::move(config), std::move(detectors)) {
m_eventLength = m_config.get<double>("eventLength", static_cast<double>(Units::convert(10, "us")));
m_eventLength = m_config.get<double>("event_length", static_cast<double>(Units::convert(10, "us")));
}
void Metronome::initialise() {
......
......@@ -9,10 +9,10 @@ The `Metronome` module is can be used to slice data without strict event structu
Subsequent modules should read these values and adhere to them.
### Parameters
* `eventLength`: Length of the event to be defined in physical units (not clock cycles of a specific device). Default value is `10us`.
* `event_length`: Length of the event to be defined in physical units (not clock cycles of a specific device). Default value is `10us`.
### Usage
```toml
[Metronome]
eventLength = 500ns
event_length = 500ns
```
......@@ -8,18 +8,18 @@ using namespace std;
OnlineMonitor::OnlineMonitor(Configuration config, std::vector<std::shared_ptr<Detector>> detectors)
: Module(std::move(config), std::move(detectors)) {
canvasTitle = m_config.get<std::string>("canvasTitle", "Corryvreckan Testbeam Monitor");
canvasTitle = m_config.get<std::string>("canvas_title", "Corryvreckan Testbeam Monitor");
updateNumber = m_config.get<int>("update", 200);
// Set up overview plots:
canvas_overview = m_config.getMatrix<std::string>("Overview",
canvas_overview = m_config.getMatrix<std::string>("overview",
{{"Tracking4D/trackChi2"},
{"Clustering4D/%REFERENCE%/clusterTot"},
{"TestAlgorithm/%REFERENCE%/hitmap", "colz"},
{"Tracking4D/%REFERENCE%/residualsX"}});
// Set up individual plots for the DUT
canvas_dutplots = m_config.getMatrix<std::string>("DUTPlots",
canvas_dutplots = m_config.getMatrix<std::string>("dut_plots",
{{"EventLoaderCLICpix2/%DUT%/hitMap", "colz"},
{"EventLoaderCLICpix2/%DUT%/hitMapDiscarded", "colz"},
{"EventLoaderCLICpix2/%DUT%/pixelToT"},
......@@ -28,26 +28,26 @@ OnlineMonitor::OnlineMonitor(Configuration config, std::vector<std::shared_ptr<D
{"EventLoaderCLICpix2/%DUT%/pixelsPerFrame", "log"},
{"AnalysisDUT/clusterTotAssociated"},
{"AnalysisDUT/associatedTracksVersusTime"}});
canvas_tracking = m_config.getMatrix<std::string>("Tracking",
canvas_tracking = m_config.getMatrix<std::string>("tracking",
{{"Tracking4D/trackChi2"},
{"Tracking4D/trackAngleX"},
{"Tracking4D/trackAngleY"},
{"Tracking4D/trackChi2ndof"},
{"Tracking4D/tracksPerEvent"},
{"Tracking4D/clustersPerTrack"}});
canvas_hitmaps = m_config.getMatrix<std::string>("HitMaps", {{"TestAlgorithm/%DETECTOR%/hitmap", "colz"}});
canvas_residuals = m_config.getMatrix<std::string>("Residuals", {{"Tracking4D/%DETECTOR%/residualsX"}});
canvas_hitmaps = m_config.getMatrix<std::string>("hitmaps", {{"TestAlgorithm/%DETECTOR%/hitmap", "colz"}});
canvas_residuals = m_config.getMatrix<std::string>("residuals", {{"Tracking4D/%DETECTOR%/residualsX"}});
canvas_cx = m_config.getMatrix<std::string>("CorrelationX", {{"TestAlgorithm/%DETECTOR%/correlationX"}});
canvas_cx = m_config.getMatrix<std::string>("correlation_x", {{"TestAlgorithm/%DETECTOR%/correlationX"}});
canvas_cx2d =
m_config.getMatrix<std::string>("CorrelationX2D", {{"TestAlgorithm/%DETECTOR%/correlationX_2Dlocal", "colz"}});
canvas_cy = m_config.getMatrix<std::string>("CorrelationY", {{"TestAlgorithm/%DETECTOR%/correlationY"}});
m_config.getMatrix<std::string>("correlation_x2d", {{"TestAlgorithm/%DETECTOR%/correlationX_2Dlocal", "colz"}});
canvas_cy = m_config.getMatrix<std::string>("correlation_y", {{"TestAlgorithm/%DETECTOR%/correlationY"}});
canvas_cy2d =
m_config.getMatrix<std::string>("CorrelationY2D", {{"TestAlgorithm/%DETECTOR%/correlationY_2Dlocal", "colz"}});
m_config.getMatrix<std::string>("correlation_y2d", {{"TestAlgorithm/%DETECTOR%/correlationY_2Dlocal", "colz"}});
canvas_charge = m_config.getMatrix<std::string>("ChargeDistributions", {{"Clustering4D/%DETECTOR%/clusterTot"}});
canvas_charge = m_config.getMatrix<std::string>("charge_distributions", {{"Clustering4D/%DETECTOR%/clusterTot"}});
canvas_time = m_config.getMatrix<std::string>("EventTimes", {{"TestAlgorithm/%DETECTOR%/eventTimes"}});
canvas_time = m_config.getMatrix<std::string>("event_times", {{"TestAlgorithm/%DETECTOR%/eventTimes"}});
}
void OnlineMonitor::initialise() {
......
......@@ -30,20 +30,20 @@ The "corryvreckan" namespace i not required to be added to the plot path.
### Parameters
* `update`: Number of events after which to update, defaults to `500`.
* `canvasTitle`: Title of the GUI window to be shown, defaults to `Corryvreckan Testbeam Monitor`. This parameter can be used to e.g. display the current run number in the window title.
* `canvas_title`: Title of the GUI window to be shown, defaults to `Corryvreckan Testbeam Monitor`. This parameter can be used to e.g. display the current run number in the window title.
* `Overview`: List of plots to be placed on the "Overview" canvas of the online monitor. The list of plots created in the default configuration is listed below.
* `DUTPlots`: List of plots to be placed on the "DUTPlots" canvas of the online monitor. By default, this canvas is empty and should be customized for the respective DUT.
* `HitMaps`: List of plots to be placed on the "HitMaps" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/hitmap_%DETECTOR%` for all detectors.
* `Tracking`: List of plots to be placed on the "Tracking" canvas of the online monitor. The list of plots created in the default configuration is listed below.
* `Residuals`: List of plots to be placed on the "Residuals" canvas of the online monitor. By default, this canvas displays `BasicTracking/residualsX_%DETECTOR%` for all detectors.
* `CorrelationX`: List of plots to be placed on the "CorrelationX" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/correlationX_%DETECTOR%` for all detectors.
* `CorrelationY`: List of plots to be placed on the "CorrelationY" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/correlationY_%DETECTOR%` for all detectors.
* `CorrelationX2D`: List of plots to be placed on the "CorrelationX2D" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/correlationX_2Dlocal_%DETECTOR%` for all detectors.
* `CorrelationY2D`: List of plots to be placed on the "CorrelationY2D" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/correlationY_2Dlocal_%DETECTOR%` for all detectors.
* `ChargeDistributions`: List of plots to be placed on the "ChargeDistributions" canvas of the online monitor. By default, this canvas displays `Timepix3Clustering/clusterTot_%DETECTOR%` for all detectors.
* `EventTimes`: List of plots to be placed on the "EventTimes" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/eventTimes_%DETECTOR%` for all detectors.
* `overview`: List of plots to be placed on the "Overview" canvas of the online monitor. The list of plots created in the default configuration is listed below.
* `dut_plots`: List of plots to be placed on the "DUTPlots" canvas of the online monitor. By default, this canvas is empty and should be customized for the respective DUT.
* `hitmaps`: List of plots to be placed on the "HitMaps" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/hitmap_%DETECTOR%` for all detectors.
* `tracking`: List of plots to be placed on the "Tracking" canvas of the online monitor. The list of plots created in the default configuration is listed below.
* `residuals`: List of plots to be placed on the "Residuals" canvas of the online monitor. By default, this canvas displays `BasicTracking/residualsX_%DETECTOR%` for all detectors.
* `correlation_x`: List of plots to be placed on the "CorrelationX" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/correlationX_%DETECTOR%` for all detectors.
* `correlation_y`: List of plots to be placed on the "CorrelationY" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/correlationY_%DETECTOR%` for all detectors.
* `correlation_x2d`: List of plots to be placed on the "CorrelationX2D" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/correlationX_2Dlocal_%DETECTOR%` for all detectors.
* `correlation_y2d`: List of plots to be placed on the "CorrelationY2D" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/correlationY_2Dlocal_%DETECTOR%` for all detectors.
* `charge_distributions`: List of plots to be placed on the "ChargeDistributions" canvas of the online monitor. By default, this canvas displays `Timepix3Clustering/clusterTot_%DETECTOR%` for all detectors.
* `event_times`: List of plots to be placed on the "EventTimes" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/eventTimes_%DETECTOR%` for all detectors.
### Plots produced
Overview canvas:
......@@ -61,13 +61,12 @@ Tracking canvas:
```toml
[OnlineMonitor]
update = 200
DUTPlots = [["Clicpix2EventLoader/hitMap", "colz"],
[Clicpix2EventLoader/hitMapDiscarded", "colz"],
[Clicpix2EventLoader/pixelToT"],
[Clicpix2EventLoader/pixelToA"],
[Clicpix2EventLoader/pixelCnt", "log"],
[Clicpix2EventLoader/pixelsPerFrame", "log"],
[DUTAnalysis/clusterTotAssociated"],
[DUTAnalysis/associatedTracksVersusTime"]]
dut_plots = [["Clicpix2EventLoader/hitMap", "colz"],
[Clicpix2EventLoader/hitMapDiscarded", "colz"],
[Clicpix2EventLoader/pixelToT"],
[Clicpix2EventLoader/pixelToA"],
[Clicpix2EventLoader/pixelCnt", "log"],
[Clicpix2EventLoader/pixelsPerFrame", "log"],
[DUTAnalysis/clusterTotAssociated"],
[DUTAnalysis/associatedTracksVersusTime"]]
```
......@@ -9,7 +9,7 @@ Prealignment::Prealignment(Configuration config, std::shared_ptr<Detector> detec
LOG(INFO) << "Starting prealignment of detectors";
max_correlation_rms = m_config.get<double>("max_correlation_rms", static_cast<double>(Units::convert(6.0, "mm")));
damping_factor = m_config.get<double>("damping_factor", 1.0);
timingCut = m_config.get<double>("timingCut", static_cast<double>(Units::convert(100, "ns")));
timingCut = m_config.get<double>("timing_cut", static_cast<double>(Units::convert(100, "ns")));
LOG(DEBUG) << "Setting max_correlation_rms to : " << max_correlation_rms;
LOG(DEBUG) << "Setting damping_factor to : " << damping_factor;
}
......
......@@ -12,10 +12,9 @@ This initial alignment along the X and Y axes is designed to be performed before
The required translational shifts in X and Y are calculated for each detector as the mean of the 1D correlation histogram along the axis.
### Parameters
* `reference`: Name of the detector used as the alignment reference plane. All other telescope planes are aligned with respect to the reference plane.
* `damping_factor`: A factor to change the percentage of the calcuated shift applied to each detector. Default value is `1`.
* `max_correlation_rms`: The maximum RMS of the 1D correlation histograms allowed for the shifts to be applied. This factor should be tuned for each run, and is combat the effect of flat distributions. Default value is `6mm`.
* `timingCut`: maximum time difference between clusters to be taken into account. Defaults to `100ns`.
* `timing_cut`: maximum time difference between clusters to be taken into account. Defaults to `100ns`.
### Plots Created
For each detector the following plots are produced:
......@@ -31,8 +30,6 @@ For each detector the following plots are produced:
```toml
[Prealignment]
log_level = INFO
reference = "W0013_D04"
masked = "W0005_H03" #excluding the DUT from the prelaignment
max_correlation_rms = 6.0
damping_factor = 1.0
```
......@@ -9,9 +9,9 @@ This module collects `pixel` and `cluster` objects from the clipboard and create
### Parameters
* `makeCorrelatons`: Boolean to change if correlation plots should be outputted. Default value is `false`.
* `doTimingCut`: Boolean to switch on/off the cut on cluster times for correlations. Defaults to `false`.
* `timingCut`: maximum time difference between clusters to be taken into account. Only used if `doTimingCut` is set to `true`, defaults to `100ns`.
* `make_correlatons`: Boolean to change if correlation plots should be outputted. Default value is `false`.
* `do_timing_cut`: Boolean to switch on/off the cut on cluster times for correlations. Defaults to `false`.
* `timing_cut`: maximum time difference between clusters to be taken into account. Only used if `do_timing_cut` is set to `true`, defaults to `100ns`.
### Plots produced
For each device the following plots are produced:
......@@ -30,5 +30,5 @@ For each device the following plots are produced:
### Usage
```toml
[TestAlgorithm]
makeCorrelations = true
make_correlations = true
```
......@@ -6,10 +6,9 @@ using namespace std;
TestAlgorithm::TestAlgorithm(Configuration config, std::shared_ptr<Detector> detector)
: Module(std::move(config), detector), m_detector(detector) {
makeCorrelations = m_config.get<bool>("makeCorrelations", false);
timingCut = m_config.get<double>("timingCut", static_cast<double>(Units::convert(100, "ns")));
do_timing_cut_ = m_config.get<bool>("doTimingCut", false);
m_eventLength = m_config.get<double>("eventLength", 1);
makeCorrelations = m_config.get<bool>("make_correlations", false);
timingCut = m_config.get<double>("timing_cut", static_cast<double>(Units::convert(100, "ns")));
do_timing_cut_ = m_config.get<bool>("do_timing_cut", false);
}
void TestAlgorithm::initialise() {
......@@ -38,8 +37,8 @@ void TestAlgorithm::initialise() {
// time correlation plot range should cover length of events. nanosecond binning.
title = m_detector->name() + "Reference cluster time stamp - cluster time stamp;t_{ref}-t [ns];events";
correlationTime = new TH1F(
"correlationTime", title.c_str(), static_cast<int>(2. * m_eventLength), -1 * m_eventLength, m_eventLength);
correlationTime =
new TH1F("correlationTime", title.c_str(), static_cast<int>(2. * timingCut), -1 * timingCut, timingCut);
title = m_detector->name() + "Reference cluster time stamp - cluster time stamp;t_{ref}-t [1/40MHz];events";
correlationTimeInt = new TH1F("correlationTimeInt", title.c_str(), 8000, -40000, 40000);
......
......@@ -44,9 +44,6 @@ namespace corryvreckan {
bool makeCorrelations;
double timingCut;
bool do_timing_cut_;
// parameters
double m_eventLength;
};
} // namespace corryvreckan
#endif // TESTALGORITHM_H
......@@ -9,11 +9,10 @@ This module performs a basic tracking method.
Clusters from the first plane in Z (named the seed plane) are related to clusters close in time on the other detector planes using straight line tracks. The DUT plane can be excluded from the track finding.
### Parameters
* `timingCut`: Maximum time difference allowed between clusters for association. Default value is `200ns`.
* `spatialCut`: Maximum spatial distance in the XY plane allowed between clusters for association for the telescope planes. Default value is `0.2mm`.
* `minHitsOnTrack`: Minium number of associated clusters needed to create a track, equivalent to the minimum number of planes required for each track. Default value is `6`.
* `excludeDUT`: Boolean to chose if the DUT plane is included in the track finding. Default value is `true`.
* `DUT`: Name of the DUT plane.
* `timing_cut`: Maximum time difference allowed between clusters for association. Default value is `200ns`.
* `spatial_cut`: Maximum spatial distance in the XY plane allowed between clusters for association for the telescope planes. Default value is `0.2mm`.
* `min_hits_on_track`: Minium number of associated clusters needed to create a track, equivalent to the minimum number of planes required for each track. Default value is `6`.
* `exclude_dut`: Boolean to chose if the DUT plane is included in the track finding. Default value is `true`.
### Plots produced
* Track chi^2 histogram
......@@ -37,9 +36,8 @@ For each detector the following plots are produced:
### Usage
```toml
[BasicTracking]
minHitsOnTrack = 4
spatialCut = 300um
DUT = "W13_01"
timingCut = 200ns
excludeDUT = true
min_hits_on_track = 4
spatial_cut = 300um
timing_cut = 200ns
exclude_dut = true
```
......@@ -10,10 +10,10 @@ Tracking4D::Tracking4D(Configuration config, std::vector<std::shared_ptr<Detecto
: Module(std::move(config), std::move(detectors)) {
// Default values for cuts
timingCut = m_config.get<double>("timingCut", static_cast<double>(Units::convert(200, "ns")));
spatialCut = m_config.get<double>("spatialCut", static_cast<double>(Units::convert(0.2, "mm")));
minHitsOnTrack = m_config.get<size_t>("minHitsOnTrack", 6);
excludeDUT = m_config.get<bool>("excludeDUT", true);
timingCut = m_config.get<double>("timing_cut", static_cast<double>(Units::convert(200, "ns")));
spatialCut = m_config.get<double>("spatial_cut", static_cast<double>(Units::convert(0.2, "mm")));
minHitsOnTrack = m_config.get<size_t>("min_hits_on_track", 6);
excludeDUT = m_config.get<bool>("exclude_dut", true);
}
void Tracking4D::initialise() {
......
# TrackingSpatial
**Maintainer**: Daniel Hynds (<daniel.hynds@cern.ch>)
**Module Type**: *GLOBAL*
**Status**: Functional
**Maintainer**: Daniel Hynds (<daniel.hynds@cern.ch>)
**Module Type**: *GLOBAL*
**Status**: Functional
### Description
This module performs track finding using only positional information (no timing information). It is based on a linear extrapolation along the Z-axis, followed by a nearest neighbour search.
### Parameters
* `spatialCut`: Cut on the maximum distance between the track and cluster for them to be considered associated. Default value is `200um`.
* `spatialCutDUT`: Cut on the maximum distance between the track and cluster for them to be considered associated for the DUT. Default value is `200um`.
* `minHitsOnTrack`: The minimum number of planes with clusters associated to a track for it to be stored. Default value is `6`.
* `excludeDUT`: Boolean to set if the DUT should be included in the track fitting. Default value is `true`.
* `DUT`: Name of the DUT plane.
* `spatial_cut`: Cut on the maximum distance between the track and cluster for them to be considered associated. Default value is `200um`.
* `min_hits_on_track`: The minimum number of planes with clusters associated to a track for it to be stored. Default value is `6`.
* `exclude_dut`: Boolean to set if the DUT should be included in the track fitting. Default value is `true`.
### Plots produced
* Track chi^2 histogram
......@@ -29,8 +27,7 @@ Plots produced per device:
### Usage
```toml
[SpatialTracking]
spatialCut = 0.2
minHitsOnTrack = 5
excludeDUT = true
DUT = "W0005_H03"
spatial_cut = 0.2mm
min_hits_on_track = 5
exclude_dut = true
```
......@@ -7,9 +7,9 @@ using namespace std;
TrackingSpatial::TrackingSpatial(Configuration config, std::vector<std::shared_ptr<Detector>> detectors)
: Module(std::move(config), std::move(detectors)) {
spatialCut = m_config.get<double>("spatialCut", static_cast<double>(Units::convert(200, "um")));
minHitsOnTrack = m_config.get<size_t>("minHitsOnTrack", 6);
excludeDUT = m_config.get<bool>("excludeDUT", true);
spatialCut = m_config.get<double>("spatial_cut", static_cast<double>(Units::convert(200, "um")));
minHitsOnTrack = m_config.get<size_t>("min_hits_on_track", 6);
excludeDUT = m_config.get<bool>("exclude_dut", true);
}
/*
......
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