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

Merge branch 'improve_plot_names_dutassociation' into 'master'

DUTAssociation: update names + axis labels of histograms

See merge request !205
parents f5cac97e de4e68ec
Pipeline #1256592 passed with stages
in 13 minutes and 37 seconds
......@@ -39,54 +39,52 @@ void DUTAssociation::initialise() {
hCutHisto->GetXaxis()->SetBinLabel(1, "Spatial");
hCutHisto->GetXaxis()->SetBinLabel(2, "Timing");
hX1X2 = new TH1D("hX1X2",
"x distance of cluster centre minus closest pixel to track; xdistance(cluster) - xdistance(closest "
"pixel) [um]; # events",
2000,
-1000,
1000);
hY1Y2 = new TH1D("hY1Y2",
"y distance of cluster centre minus closest pixel to track; ydistance(cluster) - ydistance(closest "
"pixel) [um]; # events",
2000,
-1000,
1000);
hX1X2_1px = new TH1D("hX1X2_1px",
"x distance of cluster centre minus closest pixel to track - 1 pixel cluster; xdistance(cluster) - "
"xdistance(closest pixel) [um]; # events",
2000,
-1000,
1000);
hY1Y2_1px = new TH1D("hY1Y2_1px",
"y distance of cluster centre minus closest pixel to track - 1 pixel cluster; ydistance(cluster) - "
"ydistance(closest pixel) [um]; # events",
2000,
-1000,
1000);
hX1X2_2px = new TH1D("hX1X2_2px",
"x distance of cluster centre minus closest pixel to track - 2 pixel cluster; xdistance(cluster) - "
"xdistance(closest pixel) [um]; # events",
2000,
-1000,
1000);
hY1Y2_2px = new TH1D("hY1Y2_2px",
"y distance of cluster centre minus closest pixel to track - 2 pixel cluster; ydistance(cluster) - "
"ydistance(closest pixel) [um]; # events",
2000,
-1000,
1000);
hX1X2_3px = new TH1D("hX1X2_3px",
"x distance of cluster centre minus closest pixel to track - 3 pixel cluster; xdistance(cluster) - "
"xdistance(closest pixel) [um]; # events",
2000,
-1000,
1000);
hY1Y2_3px = new TH1D("hY1Y2_3px",
"y distance of cluster centre minus closest pixel to track - 3 pixel cluster; ydistance(cluster) - "
"ydistance(closest pixel) [um]; # events",
2000,
-1000,
1000);
hDistX = new TH1D("hDistXClusterClosestPx",
"Distance cluster center to pixel closest to track; x_{cluster} - x_{closest pixel} [um]; # events",
2000,
-1000,
1000);
hDistY = new TH1D("hDistYClusterClosestPx",
"Distance cluster center to pixel closest to track; y_{cluster} - y_{closest pixel} [um]; # events",
2000,
-1000,
1000);
hDistX_1px =
new TH1D("hDistXClusterClosestPx_1px",
"Distance 1px-cluster center to pixel closest to track; x_{cluster} - x_{closest pixel} [um]; # events",
2000,
-1000,
1000);
hDistY_1px =
new TH1D("hDistYClusterClosestPx_1px",
"Distance 1px-cluster center to pixel closest to track; y_{cluster} - y_{closest pixel} [um]; # events",
2000,
-1000,
1000);
hDistX_2px =
new TH1D("hDistXClusterClosestPx_2px",
"Distance 2px-cluster center to pixel closest to track; x_{cluster} - x_{closest pixel} [um]; # events",
2000,
-1000,
1000);
hDistY_2px =
new TH1D("hDistYClusterClosestPx_2px",
"Distance 2px-cluster center to pixel closest to track; y_{cluster} - y_{closest pixel} [um]; # events",
2000,
-1000,
1000);
hDistX_3px =
new TH1D("hDistXClusterClosestPx_3px",
"Distance 3px-cluster center to pixel closest to track; x_{cluster} - x_{closest pixel} [um]; # events",
2000,
-1000,
1000);
hDistY_3px =
new TH1D("hDistYClusterClosestPx_3px",
"Distance 3px-cluster center to pixel closest to track; y_{cluster} - y_{closest pixel} [um]; # events",
2000,
-1000,
1000);
// Nr of associated clusters per track
title = m_detector->name() + ": number of associated clusters per track;associated clusters;events";
......@@ -140,25 +138,25 @@ StatusCode DUTAssociation::run(std::shared_ptr<Clipboard> clipboard) {
ydistance_nearest = std::min(ydistance_nearest, std::abs(interceptLocal.Y() - pixelPositionLocal.y()));
}
hX1X2->Fill(xdistance_centre - xdistance_nearest);
hY1Y2->Fill(ydistance_centre - ydistance_nearest);
hDistX->Fill(xdistance_centre - xdistance_nearest);
hDistY->Fill(ydistance_centre - ydistance_nearest);
if(cluster->columnWidth() == 1) {
hX1X2_1px->Fill(static_cast<double>(Units::convert(xdistance_centre - xdistance_nearest, "um")));
hDistX_1px->Fill(static_cast<double>(Units::convert(xdistance_centre - xdistance_nearest, "um")));
}
if(cluster->rowWidth() == 1) {
hY1Y2_1px->Fill(static_cast<double>(Units::convert(ydistance_centre - ydistance_nearest, "um")));
hDistY_1px->Fill(static_cast<double>(Units::convert(ydistance_centre - ydistance_nearest, "um")));
}
if(cluster->columnWidth() == 2) {
hX1X2_2px->Fill(static_cast<double>(Units::convert(xdistance_centre - xdistance_nearest, "um")));
hDistX_2px->Fill(static_cast<double>(Units::convert(xdistance_centre - xdistance_nearest, "um")));
}
if(cluster->rowWidth() == 2) {
hY1Y2_2px->Fill(static_cast<double>(Units::convert(ydistance_centre - ydistance_nearest, "um")));
hDistY_2px->Fill(static_cast<double>(Units::convert(ydistance_centre - ydistance_nearest, "um")));
}
if(cluster->columnWidth() == 3) {
hX1X2_3px->Fill(static_cast<double>(Units::convert(xdistance_centre - xdistance_nearest, "um")));
hDistX_3px->Fill(static_cast<double>(Units::convert(xdistance_centre - xdistance_nearest, "um")));
}
if(cluster->rowWidth() == 3) {
hY1Y2_3px->Fill(static_cast<double>(Units::convert(ydistance_centre - ydistance_nearest, "um")));
hDistY_3px->Fill(static_cast<double>(Units::convert(ydistance_centre - ydistance_nearest, "um")));
}
// Check if the cluster is close in space (either use cluster centre of closest pixel to track)
......
......@@ -38,14 +38,14 @@ namespace corryvreckan {
int track_w_assoc_cls = 0;
TH1F* hNoAssocCls;
TH1D* hX1X2;
TH1D* hY1Y2;
TH1D* hX1X2_1px;
TH1D* hY1Y2_1px;
TH1D* hX1X2_2px;
TH1D* hY1Y2_2px;
TH1D* hX1X2_3px;
TH1D* hY1Y2_3px;
TH1D* hDistX;
TH1D* hDistY;
TH1D* hDistX_1px;
TH1D* hDistY_1px;
TH1D* hDistX_2px;
TH1D* hDistY_2px;
TH1D* hDistX_3px;
TH1D* hDistY_3px;
};
} // namespace corryvreckan
#endif // DUTAssociation_H
......@@ -21,14 +21,14 @@ The other option is to compare the distance between the cluster centre and the t
* `use_cluster_centre`: If set true, the cluster centre will be compared to the track position for the spatial cut. If false, the nearest pixel in the cluster will be used. Defaults to `false`.
### Plots produced
* distance in x of cluster centre to track minus closest pixel to track
* distance in y of cluster centre to track minus closest pixel to track
* distance in x of cluster centre to track minus closest pixel to track for pixels with column width = 1
* distance in y of cluster centre to track minus closest pixel to track for pixels with row width = 1
* distance in x of cluster centre to track minus closest pixel to track for pixels with column width = 2
* distance in y of cluster centre to track minus closest pixel to track for pixels with row width = 2
* distance in x of cluster centre to track minus closest pixel to track for pixels with column width = 3
* distance in y of cluster centre to track minus closest pixel to track for pixels with row width = 3
* distance in x from the cluster to the pixel closest to the track
* distance in y from the cluster to the pixel closest to the track
* distance in x from the cluster to the pixel closest to the track for pixels with column width = 1
* distance in y from the cluster to the pixel closest to the track for pixels with row width = 1
* distance in x from the cluster to the pixel closest to the track for pixels with column width = 2
* distance in y from the cluster to the pixel closest to the track for pixels with row width = 2
* distance in x from the cluster to the pixel closest to the track for pixels with column width = 3
* distance in y from the cluster to the pixel closest to the track for pixels with row width = 3
* distribution of number of associated clusters per track
* Number of clusters discarded by a given cut (currently only spatial and timing cuts are implemented)
......
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