Commit 1390d0dc authored by Jens Kroeger's avatar Jens Kroeger
Browse files

Clustering4D: add new histogram with pixel time - cluster time to see...

Clustering4D: add new histogram with pixel time - cluster time to see timestamp distribution with cluster
parent ba407e5b
...@@ -57,6 +57,10 @@ void Clustering4D::initialise() { ...@@ -57,6 +57,10 @@ void Clustering4D::initialise() {
clusterTimes = new TH1F("clusterTimes", title.c_str(), 3e6, 0, 3e9); clusterTimes = new TH1F("clusterTimes", title.c_str(), 3e6, 0, 3e9);
title = m_detector->getName() + " Cluster multiplicity;clusters;events"; 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, 50);
title = m_detector->getName() +
" pixel - cluster timestamp;ts_{pixel} - ts_{cluster} [ns] (all pixels from cluster (if clusterSize>1));events";
pixelTimeMinusClusterTime = new TH1F("pixelTimeMinusClusterTime", title.c_str(), 1000, -0.5, 999.5);
// Get resolution in time of detector and calculate time cut to be applied // 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 " LOG(DEBUG) << "Time cut to be applied for " << m_detector->getName() << " is "
<< Units::display(timeCut, {"ns", "us", "ms"}); << Units::display(timeCut, {"ns", "us", "ms"});
...@@ -152,6 +156,14 @@ StatusCode Clustering4D::run(std::shared_ptr<Clipboard> clipboard) { ...@@ -152,6 +156,14 @@ StatusCode Clustering4D::run(std::shared_ptr<Clipboard> clipboard) {
clusterPositionGlobal->Fill(cluster->global().x(), cluster->global().y()); clusterPositionGlobal->Fill(cluster->global().x(), cluster->global().y());
clusterTimes->Fill(static_cast<double>(Units::convert(cluster->timestamp(), "ns"))); clusterTimes->Fill(static_cast<double>(Units::convert(cluster->timestamp(), "ns")));
// to check that cluster timestamp = earliest pixel timestamp
if(cluster->size() > 1) {
for(auto& px : cluster->pixels()) {
pixelTimeMinusClusterTime->Fill(
static_cast<double>(Units::convert(px->timestamp() - cluster->timestamp(), "ns")));
}
}
deviceClusters->push_back(cluster); deviceClusters->push_back(cluster);
} }
......
...@@ -52,6 +52,7 @@ namespace corryvreckan { ...@@ -52,6 +52,7 @@ namespace corryvreckan {
TH2F* clusterPositionGlobal; TH2F* clusterPositionGlobal;
TH1F* clusterTimes; TH1F* clusterTimes;
TH1F* clusterMultiplicity; TH1F* clusterMultiplicity;
TH1F* pixelTimeMinusClusterTime;
double timeCut; double timeCut;
int neighbourRadiusRow; int neighbourRadiusRow;
......
Supports Markdown
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