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

Merge branch 'more_incluster_timing_plots' into 'master'

More incluster timing plots

See merge request !404
parents 35c280c7 5bc885fa
Pipeline #2448130 passed with stages
in 24 minutes and 53 seconds
......@@ -59,6 +59,45 @@ void AnalysisTelescope::initialize() {
telescopeMCresidualsX[detector->getName()] = new TH1F("residualX_MC_global", title.c_str(), 400, -0.2, 0.2);
title = detector->getName() + " Biased MC residual Y (global);y_{track}-y_{MC} [mm];events";
telescopeMCresidualsY[detector->getName()] = new TH1F("residualY_MC_global", title.c_str(), 400, -0.2, 0.2);
title = detector->getName() +
" pixel - seed timestamp (all pixels w/o seed);ts_{pixel} - ts_{seed} [ns]; pixel charge [e];events";
pxTimeMinusSeedTime[detector->getName()] =
new TH1F("pxTimeMinusSeedTime", title.c_str(), 1000, -99.5 * 1.5625, 900.5 * 1.5625);
title = detector->getName() +
" pixel - seed timestamp (all pixels w/o seed);ts_{pixel} - ts_{seed} [ns]; pixel charge [e];events";
pxTimeMinusSeedTime_vs_pxCharge[detector->getName()] = new TH2F(
"pxTimeMinusSeedTime_vs_pxCharge", title.c_str(), 1000, -99.5 * 1.5625, 900.5 * 1.5625, 256, -0.5, 255.5);
title = detector->getName() +
" pixel - seed timestamp (all pixels w/o seed);ts_{pixel} - ts_{seed} [ns]; pixel charge [e];events";
pxTimeMinusSeedTime_vs_pxCharge_2px[detector->getName()] = new TH2F("pxTimeMinusSeedTime_vs_pxCharge_2px",
title.c_str(),
1000,
-99.5 * 1.5625,
900.5 * 1.5625,
256,
-0.5,
255.5);
title = detector->getName() +
" pixel - seed timestamp (all pixels w/o seed);ts_{pixel} - ts_{seed} [ns]; pixel charge [e];events";
pxTimeMinusSeedTime_vs_pxCharge_3px[detector->getName()] = new TH2F("pxTimeMinusSeedTime_vs_pxCharge_3px",
title.c_str(),
1000,
-99.5 * 1.5625,
900.5 * 1.5625,
256,
-0.5,
255.5);
title = detector->getName() +
" pixel - seed timestamp (all pixels w/o seed);ts_{pixel} - ts_{seed} [ns]; pixel charge [e];events";
pxTimeMinusSeedTime_vs_pxCharge_4px[detector->getName()] = new TH2F("pxTimeMinusSeedTime_vs_pxCharge_4px",
title.c_str(),
1000,
-99.5 * 1.5625,
900.5 * 1.5625,
256,
-0.5,
255.5);
}
directory->cd();
......@@ -112,6 +151,28 @@ StatusCode AnalysisTelescope::run(const std::shared_ptr<Clipboard>& clipboard) {
telescopeResidualsX[name]->Fill(cluster->global().x() - intercept.X());
telescopeResidualsY[name]->Fill(cluster->global().y() - intercept.Y());
if(cluster->size() > 1) {
for(auto& px : cluster->pixels()) {
if(px == cluster->getSeedPixel()) {
continue; // don't fill this histogram for seed pixel!
}
pxTimeMinusSeedTime[name]->Fill(
static_cast<double>(Units::convert(px->timestamp() - cluster->timestamp(), "ns")));
pxTimeMinusSeedTime_vs_pxCharge[name]->Fill(
static_cast<double>(Units::convert(px->timestamp() - cluster->timestamp(), "ns")), px->charge());
if(cluster->size() == 2) {
pxTimeMinusSeedTime_vs_pxCharge_2px[name]->Fill(
static_cast<double>(Units::convert(px->timestamp() - cluster->timestamp(), "ns")), px->charge());
} else if(cluster->size() == 3) {
pxTimeMinusSeedTime_vs_pxCharge_3px[name]->Fill(
static_cast<double>(Units::convert(px->timestamp() - cluster->timestamp(), "ns")), px->charge());
} else if(cluster->size() == 4) {
pxTimeMinusSeedTime_vs_pxCharge_4px[name]->Fill(
static_cast<double>(Units::convert(px->timestamp() - cluster->timestamp(), "ns")), px->charge());
}
}
}
// Get the MC particles from the clipboard
auto mcParticles = clipboard->getData<MCParticle>(name);
if(mcParticles.empty()) {
......
......@@ -12,6 +12,7 @@
#define AnalysisTelescope_H 1
#include <TH1F.h>
#include <TH2F.h>
#include <iostream>
#include "core/module/Module.hpp"
#include "objects/MCParticle.hpp"
......@@ -48,6 +49,12 @@ namespace corryvreckan {
std::map<std::string, TH1F*> telescopeResolutionX;
std::map<std::string, TH1F*> telescopeResolutionY;
std::map<std::string, TH1F*> pxTimeMinusSeedTime;
std::map<std::string, TH2F*> pxTimeMinusSeedTime_vs_pxCharge;
std::map<std::string, TH2F*> pxTimeMinusSeedTime_vs_pxCharge_2px;
std::map<std::string, TH2F*> pxTimeMinusSeedTime_vs_pxCharge_3px;
std::map<std::string, TH2F*> pxTimeMinusSeedTime_vs_pxCharge_4px;
// Parameters
double chi2ndofCut;
};
......
......@@ -19,8 +19,9 @@ For the DUT, the following plots are produced:
For each detector participating in tracking, the following plots are produced:
* Biased local and global track residuals, in X and Y;
* Local and global residuals with track and Monte Carlo particle, in X and Y;
* Biased local and global track residuals, in X and Y
* Local and global residuals with track and Monte Carlo particle, in X and Y
* Time difference between seed pixel and other pixels in a cluster for different cluster sizes and vs. the pixel charge
### Usage
```toml
......
......@@ -84,9 +84,25 @@ void Clustering4D::initialize() {
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.5, 49.5);
title =
m_detector->getName() + " pixel - seed pixel timestamp (all pixels w/o seed);ts_{pixel} - ts_ {seed} [ns];events";
pxTimeMinusSeedTime = new TH1F("pxTimeMinusSeedTime", title.c_str(), 1000, -99.5 * 1.5625, 900.5 * 1.5625);
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);
" pixel - seed pixel timestamp (all pixels w/o seed);ts_{pixel} - ts_ {seed} [ns]; pixel charge [e];events";
pxTimeMinusSeedTime_vs_pxCharge =
new TH2F("pxTimeMinusSeedTime_vs_pxCharge", title.c_str(), 1000, -99.5 * 1.5625, 900.5 * 1.5625, 256, -0.5, 255.5);
title = m_detector->getName() +
" pixel - seed pixel timestamp (all pixels w/o seed);ts_{pixel} - ts_ {seed} [ns]; pixel charge [e];events";
pxTimeMinusSeedTime_vs_pxCharge_2px = new TH2F(
"pxTimeMinusSeedTime_vs_pxCharge_2px", title.c_str(), 1000, -99.5 * 1.5625, 900.5 * 1.5625, 256, -0.5, 255.5);
title = m_detector->getName() +
" pixel - seed pixel timestamp (all pixels w/o seed);ts_{pixel} - ts_ {seed} [ns]; pixel charge [e];events";
pxTimeMinusSeedTime_vs_pxCharge_3px = new TH2F(
"pxTimeMinusSeedTime_vs_pxCharge_3px", title.c_str(), 1000, -99.5 * 1.5625, 900.5 * 1.5625, 256, -0.5, 255.5);
title = m_detector->getName() +
" pixel - seed pixel timestamp (all pixels w/o seed);ts_{pixel} - ts_ {seed} [ns]; pixel charge [e];events";
pxTimeMinusSeedTime_vs_pxCharge_4px = new TH2F(
"pxTimeMinusSeedTime_vs_pxCharge_4px", title.c_str(), 1000, -99.5 * 1.5625, 900.5 * 1.5625, 256, -0.5, 255.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 "
......@@ -193,8 +209,22 @@ StatusCode Clustering4D::run(const std::shared_ptr<Clipboard>& clipboard) {
// 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")));
if(px == cluster->getSeedPixel()) {
continue; // don't fill this histogram for seed pixel!
}
pxTimeMinusSeedTime->Fill(static_cast<double>(Units::convert(px->timestamp() - cluster->timestamp(), "ns")));
pxTimeMinusSeedTime_vs_pxCharge->Fill(
static_cast<double>(Units::convert(px->timestamp() - cluster->timestamp(), "ns")), px->charge());
if(cluster->size() == 2) {
pxTimeMinusSeedTime_vs_pxCharge_2px->Fill(
static_cast<double>(Units::convert(px->timestamp() - cluster->timestamp(), "ns")), px->charge());
} else if(cluster->size() == 3) {
pxTimeMinusSeedTime_vs_pxCharge_3px->Fill(
static_cast<double>(Units::convert(px->timestamp() - cluster->timestamp(), "ns")), px->charge());
} else if(cluster->size() == 4) {
pxTimeMinusSeedTime_vs_pxCharge_4px->Fill(
static_cast<double>(Units::convert(px->timestamp() - cluster->timestamp(), "ns")), px->charge());
}
}
}
......
......@@ -52,7 +52,11 @@ namespace corryvreckan {
TH2F* clusterPositionLocal;
TH1F* clusterTimes;
TH1F* clusterMultiplicity;
TH1F* pixelTimeMinusClusterTime;
TH1F* pxTimeMinusSeedTime;
TH2F* pxTimeMinusSeedTime_vs_pxCharge;
TH2F* pxTimeMinusSeedTime_vs_pxCharge_2px;
TH2F* pxTimeMinusSeedTime_vs_pxCharge_3px;
TH2F* pxTimeMinusSeedTime_vs_pxCharge_4px;
double time_cut_;
int neighbor_radius_row_;
......
......@@ -31,7 +31,7 @@ For each detector the following plots are produced:
* 2D cluster positions in global coordinates
* Cluster times
* Cluster multiplicity
* Histogram with time difference of pixel time and cluster time for all pixels in a cluster
* Time difference between seed pixel and other pixels in a cluster for different cluster sizes and vs. the pixel charge
### Usage
```toml
......
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