Commit 39bcf883 authored by Morag Jean Williams's avatar Morag Jean Williams
Browse files

Merge branch 'solve_issue_89' into 'master'

Shift histograms by 1/2 pitch

Closes #89

See merge request !258
parents 472738c7 f249f2cf
Pipeline #1477905 passed with stages
in 29 minutes and 55 seconds
......@@ -29,29 +29,29 @@ void AnalysisDUT::initialise() {
hClusterMapAssoc = new TH2F("clusterMapAssoc",
"clusterMapAssoc; cluster col; cluster row",
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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);
hClusterSizeMapAssoc = new TProfile2D("clusterSizeMapAssoc",
"clusterSizeMapAssoc; cluster size; #entries",
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
m_detector->nPixels().Y(),
0,
-0.5,
m_detector->nPixels().X() - 0.5,
m_detector->nPixels().Y(),
-0.5,
m_detector->nPixels().Y() - 0.5,
0,
100);
hClusterChargeMapAssoc = new TProfile2D("clusterChargeMapAssoc",
"clusterSizeChargeAssoc; cluster charge [e]; #entries",
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
m_detector->nPixels().Y(),
0,
-0.5,
m_detector->nPixels().X() - 0.5,
m_detector->nPixels().Y(),
-0.5,
m_detector->nPixels().Y() - 0.5,
0,
500);
......@@ -59,28 +59,28 @@ void AnalysisDUT::initialise() {
hHitMapAssoc = new TH2F("hitMapAssoc",
"hitMapAssoc; hit column; hit row",
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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);
hHitMapROI = new TH2F("hitMapROI",
"hitMapROI; hit column; hit row",
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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);
hPixelRawValueAssoc = new TH1F("pixelRawValueAssoc", "pixelRawValueAssoc;pixel raw value;#entries", 1024, 0, 1024);
hPixelRawValueMapAssoc = new TProfile2D("pixelRawValueMapAssoc",
"pixelRawValueMapAssoc;pixel raw values;# entries",
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
m_detector->nPixels().Y(),
0,
-0.5,
m_detector->nPixels().X() - 0.5,
m_detector->nPixels().Y(),
-0.5,
m_detector->nPixels().Y() - 0.5,
0,
255);
......@@ -292,13 +292,13 @@ void AnalysisDUT::initialise() {
-10,
10);
hAssociatedTracksLocalPosition = new TH2F("hAssociatedTracksLocalPosition",
"hAssociatedTracksLocalPosition;local intercept x [mm];local intercept y [mm]",
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
m_detector->nPixels().Y(),
0,
m_detector->nPixels().Y());
"hAssociatedTracksLocalPosition;local intercept x [px];local intercept y [px]",
10 * m_detector->nPixels().X(),
-0.5,
m_detector->nPixels().X() - 0.5,
10 * m_detector->nPixels().Y(),
-0.5,
m_detector->nPixels().Y() - 0.5);
hUnassociatedTracksGlobalPosition =
new TH2F("hUnassociatedTracksGlobalPosition",
"hUnassociatedTracksGlobalPosition; global intercept x [mm]; global intercept y [mm]",
......
......@@ -54,11 +54,11 @@ void AnalysisEfficiency::initialise() {
hChipEfficiencyMap_trackPos = new TProfile2D("chipEfficiencyMap_trackPos",
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
m_detector->nPixels().Y(),
0,
-0.5,
m_detector->nPixels().X() - 0.5,
m_detector->nPixels().Y(),
-0.5,
m_detector->nPixels().Y() - 0.5,
0,
1);
title = m_detector->name() + " Global efficiency map;x [mm];y [mm];efficiency";
......@@ -76,11 +76,11 @@ void AnalysisEfficiency::initialise() {
hChipEfficiencyMap_clustPos = new TProfile2D("chipEfficiencyMap_clustPos",
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
m_detector->nPixels().Y(),
0,
-0.5,
m_detector->nPixels().X() - 0.5,
m_detector->nPixels().Y(),
-0.5,
m_detector->nPixels().Y() - 0.5,
0,
1);
title = m_detector->name() + " Global efficiency map;x [mm];y [mm];efficiency";
......@@ -205,7 +205,7 @@ StatusCode AnalysisEfficiency::run(std::shared_ptr<Clipboard> clipboard) {
auto globalIntercept = m_detector->getIntercept(track);
auto localIntercept = m_detector->globalToLocal(globalIntercept);
LOG(TRACE) << " Checking if track is outisde DUT area";
LOG(TRACE) << " Checking if track is outside DUT area";
if(!m_detector->hasIntercept(track, 1)) {
LOG(DEBUG) << " - track outside DUT area: " << localIntercept;
n_dut++;
......@@ -213,7 +213,7 @@ StatusCode AnalysisEfficiency::run(std::shared_ptr<Clipboard> clipboard) {
}
// Check that track is within region of interest using winding number algorithm
LOG(TRACE) << " Checking if track is outisde ROI";
LOG(TRACE) << " Checking if track is outside ROI";
if(!m_detector->isWithinROI(track)) {
LOG(DEBUG) << " - track outside ROI";
n_roi++;
......
......@@ -143,33 +143,33 @@ void AnalysisTimingATLASpix::initialise() {
// 2D histograms:
// column dependence
name = "hTrackCorrelationTimeVsCol";
hTrackCorrelationTimeVsCol =
new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, m_detector->nPixels().X(), 0, m_detector->nPixels().X());
hTrackCorrelationTimeVsCol = new TH2F(
name.c_str(), name.c_str(), 20000, -5000, 5000, m_detector->nPixels().X(), -0.5, m_detector->nPixels().X() - 0.5);
hTrackCorrelationTimeVsCol->GetYaxis()->SetTitle("pixel column");
hTrackCorrelationTimeVsCol->GetXaxis()->SetTitle("track time stamp - seed pixel time stamp [ns]");
// row dependence
name = "hTrackCorrelationTimeVsRow";
hTrackCorrelationTimeVsRow =
new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, m_detector->nPixels().Y(), 0, m_detector->nPixels().Y());
hTrackCorrelationTimeVsRow = new TH2F(
name.c_str(), name.c_str(), 20000, -5000, 5000, m_detector->nPixels().Y(), -0.5, m_detector->nPixels().Y() - 0.5);
hTrackCorrelationTimeVsRow->GetYaxis()->SetTitle("pixel row");
hTrackCorrelationTimeVsRow->GetXaxis()->SetTitle("track time stamp - seed pixel time stamp [ns]");
name = "hTrackCorrelationTimeVsRow_1px";
hTrackCorrelationTimeVsRow_1px =
new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, m_detector->nPixels().Y(), 0, m_detector->nPixels().Y());
hTrackCorrelationTimeVsRow_1px = new TH2F(
name.c_str(), name.c_str(), 20000, -5000, 5000, m_detector->nPixels().Y(), -0.5, m_detector->nPixels().Y() - 0.5);
hTrackCorrelationTimeVsRow_1px->GetYaxis()->SetTitle("pixel row");
hTrackCorrelationTimeVsRow_1px->GetXaxis()->SetTitle(
"track time stamp - seed pixel time stamp [ns] (single-pixel clusters)");
name = "hTrackCorrelationTimeVsRow_npx";
hTrackCorrelationTimeVsRow_npx =
new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, m_detector->nPixels().Y(), 0, m_detector->nPixels().Y());
hTrackCorrelationTimeVsRow_npx = new TH2F(
name.c_str(), name.c_str(), 20000, -5000, 5000, m_detector->nPixels().Y(), -0.5, m_detector->nPixels().Y() - 0.5);
hTrackCorrelationTimeVsRow_npx->GetYaxis()->SetTitle("pixel row");
hTrackCorrelationTimeVsRow_npx->GetXaxis()->SetTitle(
"track time stamp - seed pixel time stamp [ns] (multi-pixel clusters)");
// control plot: row dependence after row correction
name = "hTrackCorrelationTimeVsRow_rowCorr";
hTrackCorrelationTimeVsRow_rowCorr =
new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, m_detector->nPixels().Y(), 0, m_detector->nPixels().Y());
hTrackCorrelationTimeVsRow_rowCorr = new TH2F(
name.c_str(), name.c_str(), 20000, -5000, 5000, m_detector->nPixels().Y(), -0.5, m_detector->nPixels().Y() - 0.5);
hTrackCorrelationTimeVsRow_rowCorr->GetYaxis()->SetTitle("pixel row");
hTrackCorrelationTimeVsRow_rowCorr->GetXaxis()->SetTitle("track time stamp - seed pixel time stamp [ns]");
......@@ -212,8 +212,8 @@ void AnalysisTimingATLASpix::initialise() {
// final plots with both row and timewalk correction:
name = "hTrackCorrelationTimeVsRow_rowAndTimeWalkCorr";
hTrackCorrelationTimeVsRow_rowAndTimeWalkCorr =
new TH2F(name.c_str(), name.c_str(), 20000, -5000, 5000, m_detector->nPixels().Y(), 0, m_detector->nPixels().Y());
hTrackCorrelationTimeVsRow_rowAndTimeWalkCorr = new TH2F(
name.c_str(), name.c_str(), 20000, -5000, 5000, m_detector->nPixels().Y(), -0.5, m_detector->nPixels().Y() - 0.5);
hTrackCorrelationTimeVsRow_rowAndTimeWalkCorr->GetYaxis()->SetTitle("row");
hTrackCorrelationTimeVsRow_rowAndTimeWalkCorr->GetXaxis()->SetTitle("track time stamp - seed pixel time stamp [ns]");
......@@ -230,19 +230,19 @@ void AnalysisTimingATLASpix::initialise() {
hHitMapAssoc = new TH2F("hitMapAssoc",
"hitMapAssoc; x_{track} [px]; x_{track} [px]; # entries",
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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_highCharge = new TH2F("hitMapAssoc_highCharge",
"hitMapAssoc_highCharge; x_{track} [px]; x_{track} [px]; # entries",
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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_inPixel = new TH2F("hitMapAssoc_inPixel",
"hitMapAssoc_inPixel; in-pixel x_{track} [#mum]; in-pixel y_{track} [#mum]",
static_cast<int>(pitch_x),
......@@ -263,11 +263,11 @@ void AnalysisTimingATLASpix::initialise() {
hClusterMapAssoc = new TH2F("hClusterMapAssoc",
"hClusterMapAssoc; x_{cluster} [px]; x_{cluster} [px]; # entries",
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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);
hTotVsTime = new TH2F("hTotVsTime", "hTotVsTime", 64, 0, 64, 1e6, 0, 100);
hTotVsTime->GetXaxis()->SetTitle("pixel ToT [lsb]");
......@@ -280,19 +280,19 @@ void AnalysisTimingATLASpix::initialise() {
hClusterMap_leftTail = new TH2F("hClusterMap_leftTail",
"hClusterMap_leftTail; x_{cluster} [px]; x_{cluster} [px]; # entries",
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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);
hClusterMap_mainPeak = new TH2F("hClusterMap_mainPeak",
"hClusterMap_mainPeak; x_{cluster} [px]; x_{cluster} [px]; # entries",
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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);
hClusterSize_leftTail = new TH1F("clusterSize_leftTail", "clusterSize_leftTail; cluster size; # entries", 100, 0, 100);
hClusterSize_mainPeak = new TH1F("clusterSize_mainPeak", "clusterSize_mainPeak; cluster size; # entries", 100, 0, 100);
hTot_leftTail = new TH1F("hTot_leftTail", "hTot_leftTail; pixel ToT [lsb]; # events", 2 * 64, -64, 64);
......
......@@ -51,20 +51,20 @@ void Correlations::initialise() {
hitmap = new TH2F("hitmap",
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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);
title = m_detector->name() + ": hitmap of clusters;x [px];y [px];events";
hitmap_clusters = new TH2F("hitmap_clusters",
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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);
// Correlation plots
title = m_detector->name() + ": correlation X;x_{ref}-x [mm];events";
......@@ -106,56 +106,56 @@ void Correlations::initialise() {
correlationX2Dlocal = new TH2F("correlationX_2Dlocal",
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-0.5,
m_detector->nPixels().X() - 0.5,
reference->nPixels().X(),
0,
reference->nPixels().X());
-0.5,
reference->nPixels().X() - 0.5);
title = m_detector->name() + ": 2D correlation Y (local);y [px];y_{ref} [px];events";
correlationY2Dlocal = new TH2F("correlationY_2Dlocal",
title.c_str(),
m_detector->nPixels().Y(),
0,
m_detector->nPixels().Y(),
-0.5,
m_detector->nPixels().Y() - 0.5,
reference->nPixels().Y(),
0,
reference->nPixels().Y());
-0.5,
reference->nPixels().Y() - 0.5);
title = m_detector->name() + ": correlation col to col;col [px];col_{ref} [px];events";
correlationColCol_px = new TH2F("correlationColCol_px",
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-0.5,
m_detector->nPixels().X() - 0.5,
reference->nPixels().X(),
0,
reference->nPixels().X());
-0.5,
reference->nPixels().X() - 0.5);
title = m_detector->name() + ": correlation col to row;col [px];row_{ref} [px];events";
correlationColRow_px = new TH2F("correlationColRow_px",
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-0.5,
m_detector->nPixels().X() - 0.5,
reference->nPixels().Y(),
0,
reference->nPixels().Y());
-0.5,
reference->nPixels().Y() - 0.5);
title = m_detector->name() + ": correlation row to col;row [px];col_{ref} [px];events";
correlationRowCol_px = new TH2F("correlationRowCol_px",
title.c_str(),
m_detector->nPixels().Y(),
0,
m_detector->nPixels().Y(),
-0.5,
m_detector->nPixels().Y() - 0.5,
reference->nPixels().X(),
0,
reference->nPixels().X());
-0.5,
reference->nPixels().X() - 0.5);
title = m_detector->name() + ": correlation row to row;row [px];row_{ref} [px];events";
correlationRowRow_px = new TH2F("correlationRowRow_px",
title.c_str(),
m_detector->nPixels().Y(),
0,
m_detector->nPixels().Y(),
-0.5,
m_detector->nPixels().Y() - 0.5,
reference->nPixels().Y(),
0,
reference->nPixels().Y());
-0.5,
reference->nPixels().Y() - 0.5);
title = m_detector->name() + ": 2D correlation X (global);x [mm];x_{ref} [mm];events";
correlationX2D = new TH2F("correlationX_2D", title.c_str(), 100, -10., 10., 100, -10., 10.);
......
......@@ -81,29 +81,29 @@ void EventLoaderATLASpix::initialise() {
hHitMap = new TH2F("hitMap",
"hitMap; pixel column; pixel row; # events",
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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);
hHitMap_highTot = new TH2F("hitMap_highTot",
"hitMap_hithTot; pixel column; pixel row; # events",
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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);
hHitMap_totWeighted = new TProfile2D("hHitMap_totWeighted",
"hHitMap_totWeighted; pixel column; pixel row; # events",
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
m_detector->nPixels().Y(),
0,
-0.5,
m_detector->nPixels().X() - 0.5,
m_detector->nPixels().Y(),
-0.5,
m_detector->nPixels().Y() - 0.5,
0,
100);
......
......@@ -118,31 +118,31 @@ void EventLoaderCLICpix2::initialise() {
hHitMap = new TH2F("hitMap",
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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);
title = m_detector->name() + " Map of discarded hits;x [px];y [px];pixels";
hHitMapDiscarded = new TH2F("hitMapDiscarded",
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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);
title = m_detector->name() + " TOT spectrum;TOT;pixels";
hPixelToT = new TH1F("pixelToT", title.c_str(), 32, 0, 31);
title = m_detector->name() + " TOT map;x [px];y [px];TOT";
hPixelToTMap = new TProfile2D("pixelToTMap",
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
m_detector->nPixels().Y(),
0,
-0.5,
m_detector->nPixels().X() - 0.5,
m_detector->nPixels().Y(),
-0.5,
m_detector->nPixels().Y() - 0.5,
0,
maxcounter - 1);
title = m_detector->name() + " TOA spectrum;TOA;pixels";
......@@ -159,11 +159,11 @@ void EventLoaderCLICpix2::initialise() {
hMaskMap = new TH2F("maskMap",
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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);
for(int column = 0; column < m_detector->nPixels().X(); column++) {
for(int row = 0; row < m_detector->nPixels().Y(); row++) {
if(m_detector->masked(column, row)) {
......
......@@ -70,21 +70,21 @@ void EventLoaderEUDAQ2::initialise() {
hitmap = new TH2F("hitmap",
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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);
title = "rawValues; column; row; raw values";
hRawValuesMap = new TProfile2D("hRawValuesMap",
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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);
title = ";hit time [ms];# events";
hPixelTimes = new TH1F("hPixelTimes", title.c_str(), 3e6, 0, 3e3);
......
......@@ -214,11 +214,11 @@ void EventLoaderTimepix3::initialise() {
hHitMap = new TH2F("hitMap",
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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);
}
StatusCode EventLoaderTimepix3::run(std::shared_ptr<Clipboard> clipboard) {
......
......@@ -39,21 +39,21 @@ void MaskCreator::initialise() {
maskmap = new TH2F("maskmap",
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-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);
title = m_detector->name() + " Occupancy;x [px];y [px];entries";
m_occupancy = new TH2D("occupancy",
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
-0.5,
m_detector->nPixels().X()