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

Merge branch 'shift_int_histograms' into 'master'

Shift integer histograms by -1/2 bin

See merge request corryvreckan/corryvreckan!294
parents 8024d56b 3b93675a
......@@ -72,7 +72,7 @@ void AnalysisDUT::initialise() {
m_detector->nPixels().Y(),
-0.5,
m_detector->nPixels().Y() - 0.5);
hPixelRawValueAssoc = new TH1F("pixelRawValueAssoc", "pixelRawValueAssoc;pixel raw value;#entries", 1024, 0, 1024);
hPixelRawValueAssoc = new TH1F("pixelRawValueAssoc", "pixelRawValueAssoc;pixel raw value;#entries", 1024, -0.5, 1023.5);
hPixelRawValueMapAssoc = new TProfile2D("pixelRawValueMapAssoc",
"pixelRawValueMapAssoc;pixel raw values;# entries",
m_detector->nPixels().X(),
......@@ -106,13 +106,13 @@ void AnalysisDUT::initialise() {
clusterChargeAssoc =
new TH1F("clusterChargeAssociated", "clusterChargeAssociated;cluster charge [e];# entries", 10000, 0, 10000);
clusterSizeAssoc = new TH1F("clusterSizeAssociated", "clusterSizeAssociated;cluster size; # entries", 30, 0, 30);
clusterSizeAssoc = new TH1F("clusterSizeAssociated", "clusterSizeAssociated;cluster size; # entries", 30, -0.5, 29.5);
clusterSizeAssocNorm = new TH1F(
"clusterSizeAssociatedNormalized", "clusterSizeAssociatedNormalized;cluster size normalized;#entries", 30, 0, 30);
clusterWidthRowAssoc =
new TH1F("clusterWidthRowAssociated", "clusterWidthRowAssociated;cluster size row; # entries", 30, 0, 30);
new TH1F("clusterWidthRowAssociated", "clusterWidthRowAssociated;cluster size row; # entries", 30, -0.5, 29.5);
clusterWidthColAssoc =
new TH1F("clusterWidthColAssociated", "clusterWidthColAssociated;cluster size col; # entries", 30, 0, 30);
new TH1F("clusterWidthColAssociated", "clusterWidthColAssociated;cluster size col; # entries", 30, -0.5, 29.5);
// In-pixel studies:
auto pitch_x = static_cast<double>(Units::convert(m_detector->getPitch().X(), "um"));
......
......@@ -120,56 +120,54 @@ void AnalysisEfficiency::initialise() {
hTimeDiffPrevTrack_noAssocCluster->GetXaxis()->SetTitle("time diff [#mus]");
hTimeDiffPrevTrack_noAssocCluster->GetYaxis()->SetTitle("events");
hRowDiffPrevTrack_assocCluster = new TH1D("rowDiffPrevTrack_assocCluster",
"rowDiffPrevTrack_assocCluster",
2 * m_detector->nPixels().Y(),
-m_detector->nPixels().Y(),
m_detector->nPixels().Y());
hRowDiffPrevTrack_assocCluster->GetXaxis()->SetTitle("row difference (matched track to prev track) [px]");
hRowDiffPrevTrack_assocCluster->GetYaxis()->SetTitle("# events");
hColDiffPrevTrack_assocCluster = new TH1D("colDiffPrevTrack_assocCluster",
"colDiffPrevTrack_assocCluster",
2 * m_detector->nPixels().X(),
-m_detector->nPixels().X(),
m_detector->nPixels().X());
hColDiffPrevTrack_assocCluster->GetXaxis()->SetTitle("column difference (matched track to prev track) [px]");
hColDiffPrevTrack_assocCluster->GetYaxis()->SetTitle("# events");
hRowDiffPrevTrack_noAssocCluster = new TH1D("rowDiffPrevTrack_noAssocCluster",
"rowDiffPrevTrack_noAssocCluster",
2 * m_detector->nPixels().Y(),
-m_detector->nPixels().Y(),
m_detector->nPixels().Y());
hRowDiffPrevTrack_noAssocCluster->GetXaxis()->SetTitle("row difference (non-matched track - prev track) [px]");
hRowDiffPrevTrack_noAssocCluster->GetYaxis()->SetTitle("events");
hColDiffPrevTrack_noAssocCluster = new TH1D("colDiffPrevTrack_noAassocCluster",
"colDiffPrevTrack_noAssocCluster",
2 * m_detector->nPixels().X(),
-m_detector->nPixels().X(),
m_detector->nPixels().X());
hColDiffPrevTrack_noAssocCluster->GetXaxis()->SetTitle("column difference (non-matched track - prev track) [px]");
hColDiffPrevTrack_noAssocCluster->GetYaxis()->SetTitle("events");
hRowDiffPrevTrack_assocCluster =
new TH1D("rowDiffPrevTrack_assocCluster",
"rowDiffPrevTrack_assocCluster; row difference (matched track to prev track) [px];# events",
2 * m_detector->nPixels().Y(),
-m_detector->nPixels().Y() - 0.5,
m_detector->nPixels().Y() - 0.5);
hColDiffPrevTrack_assocCluster =
new TH1D("colDiffPrevTrack_assocCluster",
"colDiffPrevTrack_assocCluster;column difference (matched track to prev track) [px];# events",
2 * m_detector->nPixels().X(),
-m_detector->nPixels().X() - 0.5,
m_detector->nPixels().X() - 0.5);
hRowDiffPrevTrack_noAssocCluster =
new TH1D("rowDiffPrevTrack_noAssocCluster",
"rowDiffPrevTrack_noAssocCluster;row difference (non-matched track - prev track) [px];# events",
2 * m_detector->nPixels().Y(),
-m_detector->nPixels().Y() - 0.5,
m_detector->nPixels().Y() - 0.5);
hColDiffPrevTrack_noAssocCluster =
new TH1D("colDiffPrevTrack_noAassocCluster",
"colDiffPrevTrack_noAssocCluster;column difference (non-matched track - prev track) [px];# events",
2 * m_detector->nPixels().X(),
-m_detector->nPixels().X() - 0.5,
m_detector->nPixels().X() - 0.5);
hPosDiffPrevTrack_assocCluster = new TH2D("posDiffPrevTrack_assocCluster",
"posDiffPrevTrack_assocCluster",
"posDiffPrevTrack_assocCluster;column difference (matched track - prev track) "
"[px];row difference (matched track - prev track) [px];# events",
2 * m_detector->nPixels().X(),
-m_detector->nPixels().X(),
m_detector->nPixels().X(),
-m_detector->nPixels().X() - 0.5,
m_detector->nPixels().X() - 0.5,
2 * m_detector->nPixels().Y(),
-m_detector->nPixels().Y(),
m_detector->nPixels().Y());
hPosDiffPrevTrack_assocCluster->GetXaxis()->SetTitle("column difference (matched track - prev track) [px]");
hPosDiffPrevTrack_assocCluster->GetYaxis()->SetTitle("row difference (matched track - prev track) [px]");
hPosDiffPrevTrack_noAssocCluster = new TH2D("posDiffPrevTrack_noAssocCluster",
"posDiffPrevTrack_noAssocCluster",
2 * m_detector->nPixels().X(),
-m_detector->nPixels().X(),
m_detector->nPixels().X(),
2 * m_detector->nPixels().Y(),
-m_detector->nPixels().Y(),
m_detector->nPixels().Y());
hPosDiffPrevTrack_noAssocCluster->GetXaxis()->SetTitle("column difference (non-matched track - prev track) [px]");
hPosDiffPrevTrack_noAssocCluster->GetYaxis()->SetTitle("row difference (non-matched track - prev track) [px]");
-m_detector->nPixels().Y() - 0.5,
m_detector->nPixels().Y() - 0.5);
hPosDiffPrevTrack_noAssocCluster =
new TH2D("posDiffPrevTrack_noAssocCluster",
"posDiffPrevTrack_noAssocCluster;column difference (non-matched track - prev track) [px];row difference "
"(non-matched track - prev track) [px];# events",
2 * m_detector->nPixels().X(),
-m_detector->nPixels().X() - 0.5,
m_detector->nPixels().X() - 0.5,
2 * m_detector->nPixels().Y(),
-m_detector->nPixels().Y() - 0.5,
m_detector->nPixels().Y() - 0.5);
// initialize matrix with hit timestamps to all 0:
auto nRows = static_cast<size_t>(m_detector->nPixels().Y());
......
......@@ -186,22 +186,22 @@ void AnalysisTimingATLASpix::initialise() {
// control plot: time walk dependence, not row corrected
name = "hTrackCorrelationTimeVsTot";
hTrackCorrelationTimeVsTot = new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, 64, 0, 64);
hTrackCorrelationTimeVsTot = new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, 64, -0.5, 63.5);
hTrackCorrelationTimeVsTot->GetYaxis()->SetTitle("seed pixel tot [lsb]");
hTrackCorrelationTimeVsTot->GetXaxis()->SetTitle("ts_{track} - ts_{cluster} [ns]");
name = "hTrackCorrelationTimeVsTot_1px";
hTrackCorrelationTimeVsTot_1px = new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, 64, 0, 64);
hTrackCorrelationTimeVsTot_1px = new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, 64, -0.5, 63.5);
hTrackCorrelationTimeVsTot_1px->GetYaxis()->SetTitle("seed pixel tot [lsb] (if clustersize = 1)");
hTrackCorrelationTimeVsTot_1px->GetXaxis()->SetTitle("ts_{track} - ts_{cluster} [ns]");
name = "hTrackCorrelationTimeVsTot_npx";
hTrackCorrelationTimeVsTot_npx = new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, 64, 0, 64);
hTrackCorrelationTimeVsTot_npx = new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, 64, -0.5, 63.5);
hTrackCorrelationTimeVsTot_npx->GetYaxis()->SetTitle("seed pixel tot [lsb] (if clustersize > 1)");
hTrackCorrelationTimeVsTot_npx->GetXaxis()->SetTitle("ts_{track} - ts_{cluster} [ns]");
name = "hTrackCorrelationTimeVsTot_px";
hTrackCorrelationTimeVsTot_px = new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, 64, 0, 64);
hTrackCorrelationTimeVsTot_px = new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, 64, -0.5, 63.5);
hTrackCorrelationTimeVsTot_px->GetYaxis()->SetTitle("pixel tot [lsb]");
hTrackCorrelationTimeVsTot_px->GetXaxis()->SetTitle("ts_{track} - ts_{pixel} (all pixels from cluster) [ns]");
......@@ -213,17 +213,17 @@ void AnalysisTimingATLASpix::initialise() {
// timewalk after row correction
if(m_pointwise_correction_row) {
name = "hTrackCorrelationTimeVsTot_rowCorr";
hTrackCorrelationTimeVsTot_rowCorr = new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, 64, 0, 64);
hTrackCorrelationTimeVsTot_rowCorr = new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, 64, -0.5, 63.5);
hTrackCorrelationTimeVsTot_rowCorr->GetYaxis()->SetTitle("seed pixel tot [lsb]");
hTrackCorrelationTimeVsTot_rowCorr->GetXaxis()->SetTitle("ts_{track} - ts_{seed pixel} [ns]");
name = "hTrackCorrelationTimeVsTot_rowCorr_1px";
hTrackCorrelationTimeVsTot_rowCorr_1px = new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, 64, 0, 64);
hTrackCorrelationTimeVsTot_rowCorr_1px = new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, 64, -0.5, 63.5);
hTrackCorrelationTimeVsTot_rowCorr_1px->GetYaxis()->SetTitle("seed pixel tot [lsb] (single-pixel clusters)");
hTrackCorrelationTimeVsTot_rowCorr_1px->GetXaxis()->SetTitle("ts_{track} - ts_{cluster} [ns]");
name = "hTrackCorrelationTimeVsTot_rowCorr_npx";
hTrackCorrelationTimeVsTot_rowCorr_npx = new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, 64, 0, 64);
hTrackCorrelationTimeVsTot_rowCorr_npx = new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, 64, -0.5, 63.5);
hTrackCorrelationTimeVsTot_rowCorr_npx->GetYaxis()->SetTitle("seed pixel tot [lsb] (multi-pixel clusters)");
hTrackCorrelationTimeVsTot_rowCorr_npx->GetXaxis()->SetTitle("ts_{track} - ts_{cluster} [ns]");
}
......@@ -243,7 +243,7 @@ void AnalysisTimingATLASpix::initialise() {
hTrackCorrelationTimeVsRow_rowAndTWCorr->GetXaxis()->SetTitle("ts_{track} - ts_{seed pixel} [ns]");
name = "hTrackCorrelationTimeVsTot_rowAndTWCorr";
hTrackCorrelationTimeVsTot_rowAndTWCorr = new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, 64, 0, 64);
hTrackCorrelationTimeVsTot_rowAndTWCorr = new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, 64, -0.5, 63.5);
hTrackCorrelationTimeVsTot_rowAndTWCorr->GetYaxis()->SetTitle("seed pixel tot [lsb]");
hTrackCorrelationTimeVsTot_rowAndTWCorr->GetXaxis()->SetTitle("ts_{track} - ts_{cluster} [ns]");
}
......@@ -269,7 +269,7 @@ void AnalysisTimingATLASpix::initialise() {
m_timeCut);
name = "hClusterSizeVsTot_Assoc";
hClusterSizeVsTot_Assoc = new TH2F(name.c_str(), name.c_str(), 20, 0, 20, 64, 0, 64);
hClusterSizeVsTot_Assoc = new TH2F(name.c_str(), name.c_str(), 20, 0, 20, 64, -0.5, 63.5);
hClusterSizeVsTot_Assoc->GetYaxis()->SetTitle("pixel ToT [lsb] (all pixels from cluster)");
hClusterSizeVsTot_Assoc->GetXaxis()->SetTitle("clusterSize");
......@@ -279,8 +279,8 @@ void AnalysisTimingATLASpix::initialise() {
-0.5,
m_detector->nPixels().X() - 0.5,
m_detector->nPixels().Y(),
0,
m_detector->nPixels().Y());
-0.5,
m_detector->nPixels().Y() - 0.5);
hHitMapAssoc_highToT = new TH2F("hitMapAssoc_highToT",
"hitMapAssoc_highToT; x_{track} [px]; y_{track} [px];# entries",
m_detector->nPixels().X(),
......@@ -320,17 +320,17 @@ void AnalysisTimingATLASpix::initialise() {
hTotVsRow = new TH2F("hTotVsRow",
"hTotVsRow;seed-pixel row;seed-pixel ToT [lsb]",
m_detector->nPixels().Y(),
0,
m_detector->nPixels().Y(),
-0.5,
m_detector->nPixels().Y() - 0.5,
64,
0,
64);
-0.5,
63.5);
hTotVsTime = new TH2F("hTotVsTime", "hTotVsTime", 64, 0, 64, 1e6, 0, 100);
hTotVsTime = new TH2F("hTotVsTime", "hTotVsTime", 64, -0.5, 63.5, 1e6, 0, 100);
hTotVsTime->GetXaxis()->SetTitle("pixel ToT [lsb]");
hTotVsTime->GetYaxis()->SetTitle("time [s]");
if(m_config.has("high_tot_cut")) {
hTotVsTime_highToT = new TH2F("hTotVsTime_highToT", "hTotVsTime_highToT", 64, 0, 64, 1e6, 0, 100);
hTotVsTime_highToT = new TH2F("hTotVsTime_highToT", "hTotVsTime_highToT", 64, -0.5, 63.5, 1e6, 0, 100);
hTotVsTime_highToT->GetXaxis()->SetTitle("pixel ToT [lsb] if > high_tot_cut");
hTotVsTime_highToT->GetYaxis()->SetTitle("time [s]");
}
......@@ -391,36 +391,36 @@ void AnalysisTimingATLASpix::initialise() {
m_detector->nPixels().Y(),
-0.5,
m_detector->nPixels().Y() - 0.5);
hClusterSize_leftTail =
new TH1F("clusterSize_leftTail", "clusterSize (left tail of time residual);cluster size;# entries", 100, 0, 100);
hClusterSize_leftTail = new TH1F(
"clusterSize_leftTail", "clusterSize (left tail of time residual);cluster size;# entries", 100, -0.5, 99.5);
hClusterSize_rightTail = new TH1F(
"clusterSize_rightTail", "clusterSize (right tail of time residual);cluster size;# entries", 100, 0, 100);
hClusterSize_mainPeak =
new TH1F("clusterSize_mainPeak", "clusterSize (main peak of time residual);cluster size;# entries", 100, 0, 100);
"clusterSize_rightTail", "clusterSize (right tail of time residual);cluster size;# entries", 100, -0.5, 99.5);
hClusterSize_mainPeak = new TH1F(
"clusterSize_mainPeak", "clusterSize (main peak of time residual);cluster size;# entries", 100, -0.5, 99.5);
hTot_leftTail =
new TH1F("hTot_leftTail", "ToT (left tail of time residual);seed pixel ToT [lsb];# events", 2 * 64, -64, 64);
hTot_rightTail =
new TH1F("hTot_rightTail", "ToT (right tail of time residual);seed pixel ToT [lsb];# events", 2 * 64, -64, 64);
new TH1F("hTot_leftTail", "ToT (left tail of time residual);seed pixel ToT [lsb];# events", 2 * 64, -64.5, 63.5);
hTot_rightTail = new TH1F(
"hTot_rightTail", "ToT (right tail of time residual);seed pixel ToT [lsb];# events", 2 * 64, -64.5, 63.5);
hTot_mainPeak = new TH1F("hTot_mainPeak",
"ToT (main peak of time residual, 1px clusters);seed pixel ToT [lsb];# events",
2 * 64,
-64,
64);
-64.5,
63.5);
hTot_leftTail_1px = new TH1F("hTot_leftTail_1px",
"ToT (left tail of time residual, 1px clusters);seed pixel ToT [lsb];# events",
2 * 64,
-64,
64);
-64.5,
63.5);
hTot_rightTail_1px = new TH1F("hTot_rightTail_1px",
"ToT (right tail of time residual, 1px clusters);seed pixel ToT [lsb];# events",
2 * 64,
-64,
64);
-64.5,
63.5);
hTot_mainPeak_1px = new TH1F("hTot_mainPeak_1px",
"ToT (main peak of time residual, 1px clusters);seed pixel ToT [lsb];# events",
2 * 64,
-64,
64);
-64.5,
63.5);
hPixelTimestamp_leftTail = new TH1F("pixelTimestamp_leftTail",
"pixelTimestamp (left tail of time residual);pixel timestamp [ms];# events",
3e6,
......
......@@ -36,21 +36,21 @@ void Clustering4D::initialise() {
// Cluster plots
std::string title = m_detector->getName() + " Cluster size;cluster size;events";
clusterSize = new TH1F("clusterSize", title.c_str(), 100, 0, 100);
clusterSize = new TH1F("clusterSize", title.c_str(), 100, -0.5, 99.5);
title = m_detector->getName() + " Cluster seed charge;cluster seed charge [e];events";
clusterSeedCharge = new TH1F("clusterSeedCharge", title.c_str(), 256, 0, 256);
clusterSeedCharge = new TH1F("clusterSeedCharge", title.c_str(), 256, -0.5, 255.5);
title = m_detector->getName() + " Cluster Width - Rows;cluster width [rows];events";
clusterWidthRow = new TH1F("clusterWidthRow", title.c_str(), 25, 0, 25);
clusterWidthRow = new TH1F("clusterWidthRow", title.c_str(), 25, -0.5, 24.5);
title = m_detector->getName() + " Cluster Width - Columns;cluster width [columns];events";
clusterWidthColumn = new TH1F("clusterWidthColumn", title.c_str(), 100, 0, 100);
clusterWidthColumn = new TH1F("clusterWidthColumn", title.c_str(), 100, -0.5, 99.5);
title = m_detector->getName() + " Cluster Charge;cluster charge [e];events";
clusterCharge = new TH1F("clusterCharge", title.c_str(), 5000, 0, 50000);
clusterCharge = new TH1F("clusterCharge", title.c_str(), 5000, -0.5, 49999.5);
title = m_detector->getName() + " Cluster Position (Global);x [mm];y [mm];events";
clusterPositionGlobal = new TH2F("clusterPositionGlobal", title.c_str(), 400, -10., 10., 400, -10., 10.);
title = ";cluster timestamp [ns]; # events";
clusterTimes = new TH1F("clusterTimes", title.c_str(), 3e6, 0, 3e9);
title = m_detector->getName() + " Cluster multiplicity;clusters;events";
clusterMultiplicity = new TH1F("clusterMultiplicity", title.c_str(), 50, 0, 50);
clusterMultiplicity = new TH1F("clusterMultiplicity", title.c_str(), 50, -0.5, 49.5);
// Get resolution in time of detector and calculate time cut to be applied
LOG(DEBUG) << "Time cut to be applied for " << m_detector->getName() << " is "
<< Units::display(timeCut, {"ns", "us", "ms"});
......
......@@ -25,15 +25,15 @@ void ClusteringSpatial::initialise() {
// Cluster plots
std::string title = m_detector->getName() + " Cluster size;cluster size;events";
clusterSize = new TH1F("clusterSize", title.c_str(), 100, 0, 100);
clusterSize = new TH1F("clusterSize", title.c_str(), 100, -0.5, 99.5);
title = m_detector->getName() + " Cluster seed charge;cluster seed charge [e];events";
clusterSeedCharge = new TH1F("clusterSeedCharge", title.c_str(), 256, 0, 256);
clusterSeedCharge = new TH1F("clusterSeedCharge", title.c_str(), 256, -0.5, 255.5);
title = m_detector->getName() + " Cluster Width - Rows;cluster width [rows];events";
clusterWidthRow = new TH1F("clusterWidthRow", title.c_str(), 25, 0, 25);
clusterWidthRow = new TH1F("clusterWidthRow", title.c_str(), 25, -0.5, 24.5);
title = m_detector->getName() + " Cluster Width - Columns;cluster width [columns];events";
clusterWidthColumn = new TH1F("clusterWidthColumn", title.c_str(), 100, 0, 100);
clusterWidthColumn = new TH1F("clusterWidthColumn", title.c_str(), 100, -0.5, 99.5);
title = m_detector->getName() + " Cluster Charge;cluster charge [e];events";
clusterCharge = new TH1F("clusterCharge", title.c_str(), 5000, 0, 50000);
clusterCharge = new TH1F("clusterCharge", title.c_str(), 5000, -0.5, 49999.5);
title = m_detector->getName() + " Cluster Position (Global);x [mm];y [mm];events";
clusterPositionGlobal = new TH2F("clusterPositionGlobal",
title.c_str(),
......
......@@ -99,7 +99,7 @@ void Correlations::initialise() {
correlationTime_px =
new TH1F("correlationTime_px", title.c_str(), static_cast<int>(2. * timeCut), -1 * timeCut, timeCut);
title = m_detector->getName() + "Reference cluster time stamp - cluster time stamp;t_{ref}-t [1/40MHz];events";
correlationTimeInt = new TH1F("correlationTimeInt", title.c_str(), 8000, -40000, 40000);
correlationTimeInt = new TH1F("correlationTimeInt", title.c_str(), 8000, -40000.5, 39999.5);
// 2D correlation plots (pixel-by-pixel, local coordinates):
title = m_detector->getName() + ": 2D correlation X (local);x [px];x_{ref} [px];events";
......
......@@ -102,7 +102,7 @@ void DUTAssociation::initialise() {
// Nr of associated clusters per track
title = m_detector->getName() + ": number of associated clusters per track;associated clusters;events";
hNoAssocCls = new TH1F("no_assoc_cls", title.c_str(), 10, 0, 10);
hNoAssocCls = new TH1F("no_assoc_cls", title.c_str(), 10, -0.5, 9.5);
LOG(DEBUG) << "DUT association time cut = " << Units::display(timeCut, {"ms", "ns"});
}
......
......@@ -109,37 +109,40 @@ void EventLoaderATLASpix::initialise() {
0,
100);
hPixelToT = new TH1F("pixelToT", "pixelToT; pixel ToT in TS2 clock cycles; # events", 64, 0, 64);
hPixelToT_beforeCorrection = new TH1F(
"pixelToT_beforeCorrection", "pixelToT_beforeCorrection; pixel ToT in TS2 clock cycles; # events", 2 * 64, -64, 64);
hPixelCharge = new TH1F("pixelCharge", "pixelCharge; pixel charge [e]; # events", 100, 0, 100);
hPixelToT = new TH1F("pixelToT", "pixelToT; pixel ToT in TS2 clock cycles; # events", 64, -0.5, 63.5);
hPixelToT_beforeCorrection = new TH1F("pixelToT_beforeCorrection",
"pixelToT_beforeCorrection; pixel ToT in TS2 clock cycles; # events",
2 * 64,
-64.5,
63.5);
hPixelCharge = new TH1F("pixelCharge", "pixelCharge; pixel charge [e]; # events", 100, -0.5, 99.5);
hPixelToA = new TH1F("pixelToA", "pixelToA; pixel ToA [ns]; # events", 100, 0, 100);
hPixelMultiplicity = new TH1F("pixelMultiplicity", "Pixel Multiplicity; # pixels; # events", 200, 0, 200);
hPixelMultiplicity = new TH1F("pixelMultiplicity", "Pixel Multiplicity; # pixels; # events", 200, -0.5, 199.5);
hPixelTimes = new TH1F("hPixelTimes", "pixelTimes; hit timestamp [ms]; # events", 3e6, 0, 3e3);
hPixelTimes_long = new TH1F("hPixelTimes_long", "pixelTimes_long; hit timestamp [s]; # events", 3e6, 0, 3e3);
hPixelTS1 = new TH1F("pixelTS1", "pixelTS1; pixel TS1 [lsb]; # events", 2050, 0, 2050);
hPixelTS2 = new TH1F("pixelTS2", "pixelTS2; pixel TS2 [lsb]; # events", 130, 0, 130);
hPixelTS1bits = new TH1F("pixelTS1bits", "pixelTS1bits; pixel TS1 bit [lsb->msb]; # events", 12, 0, 12);
hPixelTS2bits = new TH1F("pixelTS2bits", "pixelTS2bits; pixel TS2 bit [lsb->msb]; # events", 8, 0, 8);
hPixelTS1 = new TH1F("pixelTS1", "pixelTS1; pixel TS1 [lsb]; # events", 2050, -0.5, 2049.5);
hPixelTS2 = new TH1F("pixelTS2", "pixelTS2; pixel TS2 [lsb]; # events", 130, -0.5, 129.5);
hPixelTS1bits = new TH1F("pixelTS1bits", "pixelTS1bits; pixel TS1 bit [lsb->msb]; # events", 12, -0.5, 11.5);
hPixelTS2bits = new TH1F("pixelTS2bits", "pixelTS2bits; pixel TS2 bit [lsb->msb]; # events", 8, -0.5, 7.5);
hTriggersPerEvent = new TH1D("hTriggersPerEvent", "hTriggersPerEvent;triggers per event;entries", 20, 0, 20);
hTriggersPerEvent = new TH1D("hTriggersPerEvent", "hTriggersPerEvent;triggers per event;entries", 20, -0.5, 19.5);
// low ToT:
hPixelTS1_lowToT = new TH1F("pixelTS1_lowToT", "pixelTS1_lowToT; pixel TS1 [lsb]; # events", 2050, 0, 2050);
hPixelTS2_lowToT = new TH1F("pixelTS2_lowToT", "pixelTS2_lowToT; pixel TS2 [lsb]; # events", 130, 0, 130);
hPixelTS1_lowToT = new TH1F("pixelTS1_lowToT", "pixelTS1_lowToT; pixel TS1 [lsb]; # events", 2050, -0.5, 2049.5);
hPixelTS2_lowToT = new TH1F("pixelTS2_lowToT", "pixelTS2_lowToT; pixel TS2 [lsb]; # events", 130, -0.5, 129.5);
hPixelTS1bits_lowToT =
new TH1F("pixelTS1bits_lowToT", "pixelTS1bits_lowToT; pixel TS1 bit [lsb->msb]; # events", 12, 0, 12);
new TH1F("pixelTS1bits_lowToT", "pixelTS1bits_lowToT; pixel TS1 bit [lsb->msb]; # events", 12, -0.5, 11.5);
hPixelTS2bits_lowToT =
new TH1F("pixelTS2bits_lowToT", "pixelTS2bits_lowToT; pixel TS2 bit [lsb->msb]; # events", 8, 0, 8);
new TH1F("pixelTS2bits_lowToT", "pixelTS2bits_lowToT; pixel TS2 bit [lsb->msb]; # events", 8, -0.5, 7.5);
// high ToT:
hPixelTS1_highToT = new TH1F("pixelTS1_highToT", "pixelTS1_highToT; pixel TS1 [lsb]; # events", 2050, 0, 2050);
hPixelTS2_highToT = new TH1F("pixelTS2_highToT", "pixelTS2_highToT; pixel TS2 [lsb]; # events", 130, 0, 130);
hPixelTS1_highToT = new TH1F("pixelTS1_highToT", "pixelTS1_highToT; pixel TS1 [lsb]; # events", 2050, -0.5, 2049.5);
hPixelTS2_highToT = new TH1F("pixelTS2_highToT", "pixelTS2_highToT; pixel TS2 [lsb]; # events", 130, -0.5, 129.5);
hPixelTS1bits_highToT =
new TH1F("pixelTS1bits_highToT", "pixelTS1bits_highToT; pixel TS1 bit [lsb->msb]; # events", 12, 0, 12);
new TH1F("pixelTS1bits_highToT", "pixelTS1bits_highToT; pixel TS1 bit [lsb->msb]; # events", 12, -0.5, 11.5);
hPixelTS2bits_highToT =
new TH1F("pixelTS2bits_highToT", "pixelTS2bits_highToT; pixel TS2 bit [lsb->msb]; # events", 8, 0, 8);
new TH1F("pixelTS2bits_highToT", "pixelTS2bits_highToT; pixel TS2 bit [lsb->msb]; # events", 8, -0.5, 7.5);
hPixelTimeEventBeginResidual = new TH1F("hPixelTimeEventBeginResidual",
"hPixelTimeEventBeginResidual;pixel_ts - clipboard event begin [us]; # entries",
......
......@@ -50,10 +50,10 @@ void EventLoaderCLICpix::initialise() {
m_file.open(m_filename.c_str());
// Make histograms for debugging
hHitMap = new TH2F("hitMap", "hitMap", 64, 0, 64, 64, 0, 64);
hPixelToT = new TH1F("pixelToT", "pixelToT", 20, 0, 20);
hHitMap = new TH2F("hitMap", "hitMap", 64, -0.5, 63.5, 64, -0.5, 63.5);
hPixelToT = new TH1F("pixelToT", "pixelToT", 20, -0.5, 19.5);
hShutterLength = new TH1F("shutterLength", "shutterLength", 3000, 0, 0.3);
hPixelMultiplicity = new TH1F("pixelMultiplicity", "Pixel Multiplicity; # pixels; # events", 4100, 0, 4100);
hPixelMultiplicity = new TH1F("pixelMultiplicity", "Pixel Multiplicity; # pixels; # events", 4100, -0.5, 4099.5);
}
StatusCode EventLoaderCLICpix::run(std::shared_ptr<Clipboard> clipboard) {
......
......@@ -133,7 +133,7 @@ void EventLoaderCLICpix2::initialise() {
-0.5,
m_detector->nPixels().Y() - 0.5);
title = m_detector->getName() + " TOT spectrum;TOT;pixels";
hPixelToT = new TH1F("pixelToT", title.c_str(), 32, 0, 31);
hPixelToT = new TH1F("pixelToT", title.c_str(), 32, -0.5, 31.5);
title = m_detector->getName() + " TOT map;x [px];y [px];TOT";
hPixelToTMap = new TProfile2D("pixelToTMap",
title.c_str(),
......@@ -146,14 +146,14 @@ void EventLoaderCLICpix2::initialise() {
0,
maxcounter - 1);
title = m_detector->getName() + " TOA spectrum;TOA;pixels";
hPixelToA = new TH1F("pixelToA", title.c_str(), maxcounter, 0, maxcounter - 1);
hPixelToA = new TH1F("pixelToA", title.c_str(), maxcounter, -0.5, maxcounter - 0.5);
title = m_detector->getName() + " CNT spectrum;CNT;pixels";
hPixelCnt = new TH1F("pixelCnt", title.c_str(), maxcounter, 0, maxcounter - 1);
hPixelCnt = new TH1F("pixelCnt", title.c_str(), maxcounter, -0.5, maxcounter - 0.5);
title = m_detector->getName() + " Pixel Multiplicity; # pixels; # events";
hPixelMultiplicity = new TH1F("pixelMultiplicity", title.c_str(), 1000, 0, 1000);
hPixelMultiplicity = new TH1F("pixelMultiplicity", title.c_str(), 1000, -0.5, 999.5);
title = m_detector->getName() + " Timewalk;TOA;TOT;pixels";
hTimeWalk = new TH2F("timewalk", title.c_str(), maxcounter, 0, maxcounter - 1, 32, 0, 31);
hTimeWalk = new TH2F("timewalk", title.c_str(), maxcounter, -0.5, maxcounter - 0.5, 32, -0.5, 31.5);
title = m_detector->getName() + " Map of masked pixels;x [px];y [px];mask code";
hMaskMap = new TH2F("maskMap",
......
......@@ -72,7 +72,7 @@ void EventLoaderEUDAQ2::initialise() {
title = "Corryvreckan event end times (on clipboard); Corryvreckan event duration [ms];# entries";
hClipboardEventDuration = new TH1D("clipboardEventDuration", title.c_str(), 3e6, 0, 3e3);
hTriggersPerEvent = new TH1D("hTriggersPerEvent", "hTriggersPerEvent;triggers per event;entries", 20, 0, 20);
hTriggersPerEvent = new TH1D("hTriggersPerEvent", "hTriggersPerEvent;triggers per event;entries", 20, -0.5, 19.5);
// Create the following histograms only when detector is not auxiliary:
if(!m_detector->isAuxiliary()) {
......@@ -103,13 +103,13 @@ void EventLoaderEUDAQ2::initialise() {
hPixelTimes_long = new TH1F("hPixelTimes_long", title.c_str(), 3e6, 0, 3e3);
title = ";pixel raw values;# events";
hPixelRawValues = new TH1F("hPixelRawValues", title.c_str(), 1024, 0, 1024);
hPixelRawValues = new TH1F("hPixelRawValues", title.c_str(), 1024, -0.5, 1023.5);
title = "Pixel Multiplicity per EUDAQ Event;# pixels;# events";
hPixelMultiplicityPerEudaqEvent = new TH1F("hPixelMultiplicityPerEudaqEvent", title.c_str(), 1000, 0, 1000);
hPixelMultiplicityPerEudaqEvent = new TH1F("hPixelMultiplicityPerEudaqEvent", title.c_str(), 1000, -0.5, 999.5);
title = "Pixel Multiplicity per Corry Event;# pixels;# events";
hPixelMultiplicityPerCorryEvent = new TH1F("hPixelMultiplicityPerCorryEvent", title.c_str(), 1000, 0, 1000);
hPixelMultiplicityPerCorryEvent = new TH1F("hPixelMultiplicityPerCorryEvent", title.c_str(), 1000, -0.5, 999.5);
if(m_get_time_residuals) {
hPixelTimeEventBeginResidual =
......
......@@ -60,9 +60,9 @@ void EventLoaderMuPixTelescope::initialise() {
return;
} else
LOG(STATUS) << "Loaded Reader";
hHitMap = new TH2F("hitMap", "hitMap; column; row", 50, -.5, 49.5, 202, -.5, 201.5);
hPixelToT = new TH1F("pixelToT", "pixelToT; ToT in TS2 clock cycles.; ", 64, 0, 64);
hTimeStamp = new TH1F("pixelTS", "pixelTS; TS in clock cycles; ", 1024, -.5, 1023.5);
hHitMap = new TH2F("hitMap", "hitMap; column; row", 50, -0.5, 49.5, 202, -0.5, 201.5);
hPixelToT = new TH1F("pixelToT", "pixelToT; ToT in TS2 clock cycles.; ", 64, -0.5, 63.5);
hTimeStamp = new TH1F("pixelTS", "pixelTS; TS in clock cycles; ", 1024, -0.5, 1023.5);
}
StatusCode EventLoaderMuPixTelescope::run(std::shared_ptr<Clipboard> clipboard) {
......
......@@ -156,7 +156,7 @@ void EventLoaderTimepix3::initialise() {
m_file_iterator = m_files.begin();
// Calibration
pixelToT_beforecalibration = new TH1F("pixelToT_beforecalibration", "pixelToT_beforecalibration", 100, 0, 200);
pixelToT_beforecalibration = new TH1F("pixelToT_beforecalibration", "pixelToT_beforecalibration", 100, -0.5, 199.5);
if(m_detector->isDUT() && m_config.has("calibration_path") && m_config.has("threshold")) {
LOG(INFO) << "Applying calibration from " << calibrationPath;
......@@ -174,15 +174,15 @@ void EventLoaderTimepix3::initialise() {
// make graphs of calibration parameters
LOG(DEBUG) << "Creating calibration graphs";
pixelTOTParameterA = new TH2F("hist_par_a_tot", "hist_par_a_tot", 256, 0, 256, 256, 0, 256);
pixelTOTParameterB = new TH2F("hist_par_b_tot", "hist_par_b_tot", 256, 0, 256, 256, 0, 256);
pixelTOTParameterC = new TH2F("hist_par_c_tot", "hist_par_c_tot", 256, 0, 256, 256, 0, 256);
pixelTOTParameterT = new TH2F("hist_par_t_tot", "hist_par_t_tot", 256, 0, 256, 256, 0, 256);
pixelTOAParameterC = new TH2F("hist_par_c_toa", "hist_par_c_toa", 256, 0, 256, 256, 0, 256);
pixelTOAParameterD = new TH2F("hist_par_d_toa", "hist_par_d_toa", 256, 0, 256, 256, 0, 256);
pixelTOAParameterT = new TH2F("hist_par_t_toa", "hist_par_t_toa", 256, 0, 256, 256, 0, 256);
pixelTOTParameterA = new TH2F("hist_par_a_tot", "hist_par_a_tot", 256, -0.5, 255.5, 256, -0.5, 255.5);
pixelTOTParameterB = new TH2F("hist_par_b_tot", "hist_par_b_tot", 256, -0.5, 255.5, 256, -0.5, 255.5);
pixelTOTParameterC = new TH2F("hist_par_c_tot", "hist_par_c_tot", 256, -0.5, 255.5, 256, -0.5, 255.5);
pixelTOTParameterT = new TH2F("hist_par_t_tot", "hist_par_t_tot", 256, -0.5, 255.5, 256, -0.5, 255.5);
pixelTOAParameterC = new TH2F("hist_par_c_toa", "hist_par_c_toa", 256, -0.5, 255.5, 256, -0.5, 255.5);
pixelTOAParameterD = new TH2F("hist_par_d_toa", "hist_par_d_toa", 256, -0.5, 255.5, 256, -0.5, 255.5);
pixelTOAParameterT = new TH2F("hist_par_t_toa", "hist_par_t_toa", 256, -0.5, 255.5, 256, -0.5, 255.5);
timeshiftPlot = new TH1F("timeshift", "timeshift (/ns)", 1000, -10, 80);
pixelToT_aftercalibration = new TH1F("pixelToT_aftercalibration", "pixelToT_aftercalibration", 2000, 0, 20000);
pixelToT_aftercalibration = new TH1F("pixelToT_aftercalibration", "pixelToT_aftercalibration", 2000, -0.5, 19999.5);
for(size_t row = 0; row < 256; row++) {
for(size_t col = 0; col < 256; col++) {
......