Commit f6d7ea69 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'v1.0.3_cherrypicking_2' into 'v1.0-stable'

v1.0.3 cherrypicking part 2

See merge request !283
parents 52b416a3 6b261d7f
Pipeline #1552035 passed with stages
in 22 minutes and 12 seconds
......@@ -2,7 +2,7 @@
#Get the line for the CVMFS status and chech if server is transaction
clicdp_status=`cvmfs_server list | grep clicdp`
if [[ $clicdp_status == *"(stratum0 / local)"* ]]; then
if [[ $clicdp_status == *"(stratum0 / S3)"* ]]; then
echo "No ongoing CVMFS transaction detected, initializing new transaction."
# Start transaction
cvmfs_server transaction clicdp.cern.ch
......
FROM gitlab-registry.cern.ch/corryvreckan/corryvreckan/corryvreckan-base:latest
MAINTAINER Simon Spannagel <simon.spannagel@cern.ch>
ENV ROOT6_VERSION 6.10.08
ENV ROOT6_VERSION 6.20.04
# Add layer for ROOT6
ENV ROOTSYS="/opt/root6"
......@@ -33,7 +33,7 @@ RUN source scl_source enable devtoolset-7 && \
rm -rf ${ROOTSYS}/{src,build}
ENV PEARY_VERSION v0.9.12
ENV PEARY_VERSION v0.9.13
# Add layer for Caribou Peary
ENV PEARYPATH="/opt/peary"
......
......@@ -46,10 +46,10 @@ namespace corryvreckan {
TH1F* hTrackCorrelationTime;
TH1F* hTrackCorrelationTimeAssoc;
TH1F* hTrackCorrelationTime_rowCorr;
TH1F* hTrackCorrelationTime_rowAndTimeWalkCorr;
TH1F* hTrackCorrelationTime_rowAndTimeWalkCorr_l25;
TH1F* hTrackCorrelationTime_rowAndTimeWalkCorr_l40;
TH1F* hTrackCorrelationTime_rowAndTimeWalkCorr_g40;
TH1F* hTrackCorrelationTime_rowAndTWCorr;
TH1F* hTrackCorrelationTime_rowAndTWCorr_l25;
TH1F* hTrackCorrelationTime_rowAndTWCorr_l40;
TH1F* hTrackCorrelationTime_rowAndTWCorr_g40;
TH1D* hTrackCorrelationTime_example;
TH1F* hClusterTimeMinusPixelTime;
......@@ -63,31 +63,45 @@ namespace corryvreckan {
TH2F* hTrackCorrelationTimeVsTot;
TH2F* hTrackCorrelationTimeVsTot_1px;
TH2F* hTrackCorrelationTimeVsTot_npx;
TH2F* hTrackCorrelationTimeVsTot_px;
TH2F* hTrackCorrelationTimeVsTot_rowCorr;
TH2F* hTrackCorrelationTimeVsTot_rowCorr_1px;
TH2F* hTrackCorrelationTimeVsTot_rowCorr_npx;
TH2F* hTrackCorrelationTimeVsRow_rowAndTimeWalkCorr;
TH2F* hTrackCorrelationTimeVsTot_rowAndTimeWalkCorr;
TH2F* hTrackCorrelationTimeVsRow_rowAndTWCorr;
TH2F* hTrackCorrelationTimeVsTot_rowAndTWCorr;
TProfile2D* hPixelTrackCorrelationTimeMap;
TH2F* hClusterSizeVsTot_Assoc;
TH2F* hHitMapAssoc;
TH2F* hHitMapAssoc_highCharge;
TH2F* hHitMapAssoc_highToT;
TH2F* hHitMapAssoc_inPixel;
TH2F* hHitMapAssoc_inPixel_highCharge;
TH2F* hHitMapAssoc_inPixel_highToT;
TH2F* hClusterMapAssoc;
TH2F* hTotVsRow;
TH2F* hTotVsTime;
TH2F* hTotVsTime_high;
TH2F* hTotVsTime_highToT;
// Control Plots for "left tail" and "main peak" of time correlation
// Control Plots for "left/right tail" and "main peak" of time correlation
TH2F* hInPixelMap_leftTail;
TH2F* hInPixelMap_rightTail;
TH2F* hInPixelMap_mainPeak;
TH2F* hClusterMap_leftTail;
TH2F* hClusterMap_rightTail;
TH2F* hClusterMap_mainPeak;
TH1F* hTot_leftTail;
TH1F* hTot_rightTail;
TH1F* hTot_mainPeak;
TH1F* hTot_leftTail_1px;
TH1F* hTot_rightTail_1px;
TH1F* hTot_mainPeak_1px;
TH1F* hPixelTimestamp_leftTail;
TH1F* hPixelTimestamp_rightTail;
TH1F* hPixelTimestamp_mainPeak;
TH1F* hClusterSize_leftTail;
TH1F* hClusterSize_rightTail;
TH1F* hClusterSize_mainPeak;
// TGraphErrors:
......@@ -107,8 +121,8 @@ namespace corryvreckan {
double m_clusterChargeCut;
size_t m_clusterSizeCut;
int m_highTotCut; // for pixel->tot()
double m_highChargeCut; // for cluster->charge()
double m_leftTailCut;
int m_lowTotCut; // for pixel->tot()
double m_timingTailCut;
std::string m_correctionFile_row;
std::string m_correctionGraph_row;
......@@ -118,6 +132,7 @@ namespace corryvreckan {
bool m_pointwise_correction_row;
bool m_pointwise_correction_timewalk;
int m_totBinExample;
XYVector m_inpixelBinSize;
int total_tracks_uncut;
int tracks_afterChi2Cut;
......
......@@ -28,9 +28,10 @@ After this both corrections can be applied consecutively.
* `time_cut_frameedge`: Parameter to discard telescope tracks at the frame edges (start and end of the current frame). Defaults to `20ns`.
* `cluster_charge_cut`: Parameter to discard clusters with a charge larger than the cut. No default, not used if not set.
* `cluster_size_cut`: Parameter to discard clusters with a size too large, only for debugging purposes. No default, not used if not set.
* `high_tot_cut`: Cut dividing 'low' and 'high' ToT events (based on seed pixel ToT). Defaults to `40`.
* `high_tot_cut`: Cut for 'high' ToT events (based on seed pixel ToT). Defaults to `40`.
* `low_tot_cut`: Cut 'low' ToT events (based on seed pixel ToT). Defaults to `10`.
* `high_charge_cut`: Cut dividing 'low' and 'high' charge events (based on cluster charge in electrons). Defaults to `high_tot_cut` (modify when calibration is available).
* `left_tail_cut`: Cut to divide into left tail and main peak of time correlation histogram. Only used to investigate characteristics of left tail. Defaults to `-10ns`.
* `timing_tail_cut`: Cut to divide into left/right tail and main peak of time correlation histogram. Only used to investigate characteristics of left tail. Defaults to `-10ns`.
* `calc_corrections`: If `true`, TGraphErrors for row and timewalk corrections are produced.
* `correction_file_row`, `correction_file_timewalk`. Defaults to `false`.
* `correction_file_row`: Path to file which contains TGraphErrors for row correction. If this parameter is set, also `correction_graph_row` needs to be set. No default.
......@@ -55,10 +56,10 @@ For the DUT, the following plots are produced:
* Track time correlation vs. cluster row (after row correction), (after row correction, only single pixel clusters), (after row correction, only multi-pixel clusters), (after row and timewalk correction), (after row and timewalk correction)
* Cluster size vs. cluster ToT (only associated clusters)
* Hit map of all pixels from associated clusters with/without high ToT
* In-pixel distribution of tracks for clysters with/without high ToT
* In-pixel distribution of tracks for clusters with/without high ToT
* Map of associated clusters
* Pixel ToT vs. time for all clusters and for high ToT clusters
* Cluster map for main peak and left tail events in time correlation (track timestamp - cluster timestamp < left_tail_cut), (track timestamp - cluster timestamp > left_tail_cut)
* Cluster map for main peak and left/right tail events in time correlation
* TGraphErrors
* Peak of time correlation vs. row
......@@ -72,5 +73,5 @@ calc_corrections = false
correction_file_row = "correction_files/row_correction_file.root"
correction_graph_row = "AnalysisTimingATLASpix/apx0/gRTimeCorrelationVsRow"
correction_file_timewalk = "correction_files/timewalk_correction_file.root"
correction_graph_timewalk = "AnalysisTimingATLASpix/apx0/gTimCorrelationVsTot"
correction_graph_timewalk = "AnalysisTimingATLASpix/apx0/gTimeCorrelationVsTot"
```
......@@ -26,6 +26,8 @@ EventLoaderATLASpix::EventLoaderATLASpix(Configuration config, std::shared_ptr<D
m_highToTCut = m_config.get<int>("high_tot_cut", 40);
m_buffer_depth = m_config.get<int>("buffer_depth", 1000);
m_time_offset = m_config.get<double>("time_offset", 0.);
// ts1Range = 0x800 * m_clkdivendM;
ts2Range = 0x40 * m_clkdivend2M;
}
......@@ -394,6 +396,9 @@ bool EventLoaderATLASpix::read_caribou_data() { // return false when reaching eo
return true;
}
timestamp += m_time_offset;
LOG(DEBUG) << "Adding time_offset of " << m_time_offset << " to pixel timestamp. New pixel timestamp: " << timestamp;
// since calibration is not implemented yet, set charge = tot
Pixel* pixel = new Pixel(m_detector->name(), col, row, tot, tot, timestamp);
......
......@@ -120,6 +120,7 @@ namespace corryvreckan {
// int m_clkdivendM;
int m_clkdivend2M;
int m_buffer_depth;
double m_time_offset;
};
} // namespace corryvreckan
#endif // EventLoaderATLASpix_H
......@@ -19,6 +19,7 @@ Since a calibration is not yet implemented, the pixel charge is set to the pixel
* `clkdivend2`: Value of clkdivend2 register in ATLASPix specifying the speed of TS2 counter. Default is `0`.
* `high_tot_cut`: "high ToT" histograms are filled if pixel ToT is larger than this cut. Default is `40`.
* `buffer_depth`: Depth of buffer in which pixel hits are timesorted before being added to an event. If set to `1`, effectively no timesorting is done. Default is `1000`.
* `time_offset`: Time offset to be added to each pixel timestamp. Defaults to `0ns`.
### Plots produced
......
......@@ -4,10 +4,10 @@
**Status**: Functional
### Description
This module allows data recorded by EUDAQ2 and stored in a EUDAQ2 binary file as raw detector data to be read into Corryvreckan.
For each detector type, the corresponding converter module in EUDAQ2 is used to transform the data into the `StandardPlane` event type before storing the individual `Pixel` objects on the Corryvreckan clipboard.
This module allows data recorded by [EUDAQ2](https://github.com/eudaq/eudaq/) and stored in a EUDAQ2 binary file as raw detector data to be read into Corryvreckan.
For each detector type, the corresponding converter module implemented in EUDAQ2 is used to transform the data into the `StandardPlane` event type before storing the individual `Pixel` objects on the Corryvreckan clipboard.
The detectors need to be named according to the following scheme: `<detector_type>_<plane_number>` where `detector_type` is the type specified in the detectors file and `<plane_number>` is an iterative number over the planes of the same type.
The detectors need to be named according to the following scheme: `<detector_type>_<plane_number>` where `<detector_type>` is the type specified in the detectors file and `<plane_number>` is an iterative number over the planes of the same type.
If the data of different detectors is stored in separate files, the parameters `name` or `type` can be used as shown in the usage example below.
It should be noted that the order of the detectors is crucial.
......@@ -26,13 +26,13 @@ If earlier, the next event is read until a matching event is found.
If later, the pointer to this event is kept and it continues with the next detector.
Data from detectors with both triggered readout and without timestamps are matched against trigger IDs stored in the currently defined Corryvreckan event.
In case of a match, the timestamp of the respective trigger is assigned to all pixels of the device.
If no timestamp is available for the individual pixels, the pixel timestamp is set as the centre of the EUDAQ2 event.
If no detector is capable of defining events, the `[Metronome]` model needs to be used.
If no detector is capable of defining events, the `[Metronome]` module needs to be used.
Tags stores in the EUDAQ2 event header are read, a conversion to a double value is attempted and, if successful, a profile with the value over the number of events in the respective run is automatically allocated and filled. This feature can e.g. be used to log temperatures of the devices during data taking, simply storing the temperature as event tags.
Tags stored in the EUDAQ2 event header are read, a conversion to a double value is attempted and, if successful, a profile with the value over the number of events in the respective run is automatically allocated and filled.
This feature can e.g. be used to log temperatures of the devices during data taking, simply storing the temperature as event tags.
### Requirements
This module requires an installation of [EUDAQ2](https://eudaq.github.io/). The installation path needs to be set to
......@@ -54,6 +54,9 @@ For instance, to allow decoding of Caribou data, the respective EUDAQ2 module ha
```bash
cmake -DUSER_CARIBOU_BUILD=ON ..
```
__Note:__
It is important to make sure that the same compiler version is used for the installation of Corryvreckan and all its dependencies such as EUDAQ2 (if enabled).
On `lxplus` this is achieved by running `source path/to/corryvreckan/etc/setup_lxplus.sh` before beginning the installation.
### Contract between EUDAQ Decoder and EventLoader
......
......@@ -256,6 +256,11 @@ StatusCode Tracking4D::run(std::shared_ptr<Clipboard> clipboard) {
double norm = (distanceX * distanceX) / (spatial_cuts_[det].x() * spatial_cuts_[det].x()) +
(distanceY * distanceY) / (spatial_cuts_[det].y() * spatial_cuts_[det].y());
// If this is the second cluster of the track, keep it for now
if(track->nClusters() == 1 && ne == 0) {
closestClusterDistance = distance;
closestCluster = newCluster;
} else {
if(norm > 1) {
continue;
}
......@@ -266,6 +271,7 @@ StatusCode Tracking4D::run(std::shared_ptr<Clipboard> clipboard) {
closestCluster = newCluster;
}
}
}
if(closestCluster == nullptr) {
LOG(DEBUG) << "No cluster within spatial cut.";
......
......@@ -19,4 +19,4 @@ chi2ndof_cut = 8
time_cut_frameedge = 10ns
#DEPENDS test_write.conf
#PASS Total efficiency of detector W0013_G02: 100%, measured with 33304/33304 matched/total tracks
#PASS Total efficiency of detector W0013_G02: 100%, measured with 33348/33348 matched/total tracks
......@@ -24,4 +24,4 @@ spatial_cut_abs = 200um, 200um
[AnalysisTelescope]
#DATASET timepix3tel_dut150um_ebeam120_sim
#PASS Ev: 3.3k Px: 70.2k Tr: 3.2k (0.957/ev) t = 33us
#PASS Ev: 3.3k Px: 70.2k Tr: 3.2k (0.955/ev) t = 33us
......@@ -23,4 +23,4 @@ spatial_cut_abs = 200um, 200um
#DATASET timepix3tel_ebeam120
#PASS Ev: 18.8k Px: 6.23M Tr: 197.4k (10.5/ev) t = 3.76s
#PASS Ev: 18.8k Px: 6.23M Tr: 197.2k (10.5/ev) t = 3.76s
......@@ -29,4 +29,4 @@ chi2ndof_cut = 8
time_cut_frameedge = 10ns
#DATASET timepix3tel_ebeam120
#PASS Total efficiency of detector W0013_G02: 100%, measured with 32993/32993 matched/total tracks
#PASS Total efficiency of detector W0013_G02: 100%, measured with 33037/33037 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