Commit 56acbb4b authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'fixes_to_atlaspix_timing_analysis' into 'master'

Fixes/improvements to ATLASpix timing analysis

See merge request !281
parents 1ac15938 f9aeb474
Pipeline #1547686 failed with stages
in 8 minutes and 40 seconds
......@@ -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:
......@@ -106,9 +120,9 @@ namespace corryvreckan {
double m_timeCutFrameEdge;
double m_clusterChargeCut;
size_t m_clusterSizeCut;
int m_highTotCut; // for pixel->tot()
double m_highChargeCut; // for cluster->charge()
double m_leftTailCut;
int m_highTotCut; // for pixel->tot()
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->getName(), 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
......
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