Commit 38f40f19 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'master' into 'master'

Fixing pixel tolerance cut in hasIntercept function of detector class

See merge request !94
parents e7e0e02a a28d6764
Pipeline #758696 passed with stages
in 21 minutes and 8 seconds
......@@ -277,8 +277,8 @@ bool Detector::hasIntercept(const Track* track, double pixelTolerance) const {
// Check if the row and column are outside of the chip
bool intercept = true;
if(row < (pixelTolerance - 0.5) || row > (this->m_nPixels.Y() - 0.5 - pixelTolerance) ||
column < (pixelTolerance - 0.5) || column > (this->m_nPixels.X() - 0.5 - pixelTolerance))
if(row < pixelTolerance || row > (this->m_nPixels.Y() - pixelTolerance) || column < pixelTolerance ||
column > (this->m_nPixels.X() - pixelTolerance))
intercept = false;
return intercept;
......
......@@ -180,8 +180,14 @@ void AnalysisDUT::initialise() {
hAssociatedTracksGlobalPosition =
new TH2F("hAssociatedTracksGlobalPosition", "hAssociatedTracksGlobalPosition", 200, -10, 10, 200, -10, 10);
hUnassociatedTracksGlobalPosition =
new TH2F("hUnassociatedTracksGlobalPosition", "hUnassociatedTracksGlobalPosition", 200, -10, 10, 200, -10, 10);
hAssociatedTracksLocalPosition = new TH2F("hAssociatedTracksLocalPosition",
"hAssociatedTracksLocalPosition",
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
m_detector->nPixels().Y(),
0,
m_detector->nPixels().Y());
}
StatusCode AnalysisDUT::run(std::shared_ptr<Clipboard> clipboard) {
......@@ -211,7 +217,7 @@ StatusCode AnalysisDUT::run(std::shared_ptr<Clipboard> clipboard) {
auto globalIntercept = m_detector->getIntercept(track);
auto localIntercept = m_detector->globalToLocal(globalIntercept);
if(!m_detector->hasIntercept(track, 1.)) {
if(!m_detector->hasIntercept(track, 0.5)) {
LOG(DEBUG) << " - track outside DUT area";
continue;
}
......@@ -358,6 +364,8 @@ StatusCode AnalysisDUT::run(std::shared_ptr<Clipboard> clipboard) {
track->addAssociatedCluster(cluster);
hAssociatedTracksGlobalPosition->Fill(globalIntercept.X(), globalIntercept.Y());
hAssociatedTracksLocalPosition->Fill(m_detector->getColumn(localIntercept),
m_detector->getRow(localIntercept));
// Only allow one associated cluster per track
break;
......
......@@ -58,7 +58,7 @@ namespace corryvreckan {
TH2F* residualsTimeVsSignal;
TH2F* hAssociatedTracksGlobalPosition;
TH2F* hUnassociatedTracksGlobalPosition;
TH2F* hAssociatedTracksLocalPosition;
// Member variables
double spatialCut, m_timeCutFrameEdge;
......
......@@ -89,7 +89,7 @@ StatusCode AnalysisEfficiency::run(std::shared_ptr<Clipboard> clipboard) {
auto globalIntercept = m_detector->getIntercept(track);
auto localIntercept = m_detector->globalToLocal(globalIntercept);
if(!m_detector->hasIntercept(track, 1.)) {
if(!m_detector->hasIntercept(track, 0.5)) {
LOG(DEBUG) << " - track outside DUT area";
continue;
}
......
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