Commit c845476f authored by Morag Jean Williams's avatar Morag Jean Williams
Browse files

Merge branch 'clicpix2decoding' into 'master'

Merging changes from Testbeam period

See merge request simonspa/corryvreckan!32
parents 41d43ba8 76f2a16a
Pipeline #358435 passed with stages
in 11 minutes and 6 seconds
# - Try to find the Peary framework
# Once done this will define
# Peary_FOUND - System has Peary
# Peary_INCLUDE_DIRS - The Peary main include directory
# Peary_LIBRARIES - The libraries for Peary and the required components
MESSAGE(STATUS "Looking for Peary...")
FIND_PATH(Peary_INCLUDE_DIRS NAMES "peary/device/device.hpp" PATHS "$ENV{PEARYPATH}")
FIND_LIBRARY(Peary_LIBRARIES NAMES "peary" HINTS "$ENV{PEARYPATH}/lib")
IF(Peary_FIND_COMPONENTS)
FOREACH(component ${Peary_FIND_COMPONENTS})
STRING(TOLOWER "${component}" _COMP)
FIND_PATH(Peary_COMP_INCLUDE NAMES "devices/${_COMP}/${_COMP}.hpp" PATHS "$ENV{PEARYPATH}")
FIND_LIBRARY(Peary_COMP_LIB NAMES "${component}" HINTS "$ENV{PEARYPATH}/lib")
IF(Peary_COMP_INCLUDE AND Peary_COMP_LIB)
LIST(APPEND Peary_LIBRARIES "${Peary_COMP_LIB}")
SET(Peary_${component}_FOUND TRUE)
ELSE()
MESSAGE(STATUS "Looking for Peary component: ${component} -- NOTFOUND")
ENDIF()
ENDFOREACH()
ENDIF()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Peary REQUIRED_VARS Peary_INCLUDE_DIRS Peary_LIBRARIES
HANDLE_COMPONENTS
FAIL_MESSAGE "Could not find Peary or a required component, make sure all necessary components are compiled and that the variable PEARYPATH points to the installation location:\n$ export PEARYPATH=/your/path/to/Peary\n")
#!/bin/bash
# Where the code is and which run to analyse
TBCODE=..
RUN=${1}
# Set up the arguments to be passed to the testbeam code
CONDFILE=${TBCODE}/cond/Alignment${RUN}.dat
HISTOFILE=${TBCODE}/histos/alignmentHistogramsRun${RUN}.root
INPUTFILE=${TBCODE}/pixels/pixelsRun${RUN}.root
NEVENTS=-1
# If the alignment file for this run does not exist, get it from the DB
if [ ! -f ${CONDFILE} ]
then
while read run align dut thl angle
do
if [ "$run" == "$RUN" ]
then
CONDFILE=${TBCODE}/cond/Alignment${align}.dat
echo New cond file is ${CONDFILE}
fi
done <<< "$(grep ${RUN} runListAngledHVCMOS.dat)"
fi
# Launch the testbeam analysis and replace the original alignment file with the new one
${TBCODE}/bin/tbAnalysis -c ${CONDFILE} -n ${NEVENTS} -h ${HISTOFILE} -t ${INPUTFILE} -a 0
#mv alignmentOutput.dat ${CONDFILE}
#!/bin/bash
# Where the code is and which run to analyse
TBCODE=..
RUN=${1}
# Set up the arguments to be passed to the testbeam code
CONDFILE=${TBCODE}/cond/Alignment${RUN}.dat
HISTOFILE=${TBCODE}/histos/histogramsRun${RUN}test.root
INPUTFILE=${TBCODE}/pixels/pixelsRun${RUN}.root
INPUTFOLDER=${TBCODE}/example/Run${RUN}
EVENTTIME=0.0005
NEVENTS=-1
# If the alignment file for this run does not exist, get it from the DB
if [ ! -f ${CONDFILE} ]
then
while read run align dut thl angle
do
if [ "$run" == "$RUN" ]
then
CONDFILE=${TBCODE}/cond/Alignment${align}.dat
echo New cond file is ${CONDFILE}
fi
done <<< "$(grep ${RUN} runListAngledHVCMOS.dat)"
fi
# Launch the testbeam analysis and replace the original alignment file with the new one
#${TBCODE}/bin/tbAnalysis -c ${CONDFILE} -n ${NEVENTS} -h ${HISTOFILE} -t ${INPUTFILE} -s ${TBCODE}/masks/maskedPixels11044.dat
${TBCODE}/bin/tbAnalysis -c ${CONDFILE} -h ${HISTOFILE} -d ${INPUTFOLDER} -p ${EVENTTIME} -g
#!/bin/bash
TBCODE=..
DATADIR=${1}
CONDFILE=${TBCODE}/cond/alignmentLab.dat
HISTOFILE=${TBCODE}/histos/histogramsLabTest${2}.root
NEVENTS=-1
EVENTTIME=0.00005
STARTTIME=0
${TBCODE}/bin/tbAnalysis -d ${DATADIR} -c ${CONDFILE} -n ${NEVENTS} -h ${HISTOFILE} -t ${EVENTTIME} -o ${STARTTIME}
#!/bin/bash
ROOT=/afs/cern.ch/eng/clic/work/clicpix
EOSROOT=eos/clicdp/data/VertexTB/RawData/CERN_TB_DATA_May2015
RUN=${1}
RAWDATA=run0${RUN}.raw
# Get the data from EOS
mkdir -p Run${RUN}
xrdcp root://eospublic//${EOSROOT}/${RAWDATA} ${RAWDATA}
# Convert the data from the eudaq raw format
${ROOT}/../eudaq/bin/MonitorEventsSG.exe ${RAWDATA} -e 1000000 -g 10 -p Run${RUN} &> /dev/null
rm ${RAWDATA}
# Produce the ntuple of pixels
${ROOT}/tbAnalysis/branches/trunk/bin/tbAnalysis -d Run${RUN} -c ../cond/AlignmentAngle0.dat -f pixelsRun${RUN}.root
rm -rf Run${RUN}
Run Alignment DUT THL Angle
11263 Angle0 SET13 1020 0
11264 Angle0 SET13 1020 0
11265 Angle0 SET13 1020 0
11266 Angle0 SET13 1020 0
11267 Angle0 SET13 1020 0
11268 Angle0 SET13 1020 0
11269 Angle0 SET13 1020 0
11270 Angle0 SET13 1020 0
11271 Angle0 SET13 1020 0
11272 Angle0 SET13 1020 0
11645 Angle5 SET13 1020 5
11646 Angle5 SET13 1020 5
11647 Angle5 SET13 1020 5
11648 Angle5 SET13 1020 5
11649 Angle5 SET13 1020 5
11650 Angle5 SET13 1020 5
11651 Angle5 SET13 1020 5
11274 Angle10 SET13 1020 10
11275 Angle10 SET13 1020 10
11276 Angle10 SET13 1020 10
11277 Angle10 SET13 1020 10
11278 Angle10 SET13 1020 10
11279 Angle10 SET13 1020 10
11280 Angle10 SET13 1020 10
11281 Angle10 SET13 1020 10
11282 Angle10 SET13 1020 10
11283 Angle10 SET13 1020 10
11284 Angle10 SET13 1020 10
11285 Angle10 SET13 1020 10
11286 Angle10 SET13 1020 10
11549 Angle15 SET13 1020 15
11550 Angle15 SET13 1020 15
11551 Angle15 SET13 1020 15
11552 Angle15 SET13 1020 15
11553 Angle15 SET13 1020 15
11554 Angle15 SET13 1020 15
11555 Angle15 SET13 1020 15
11556 Angle15 SET13 1020 15
11557 Angle15 SET13 1020 15
11558 Angle15 SET13 1020 15
11559 Angle15 SET13 1020 15
11288 Angle20 SET13 1020 20
11289 Angle20 SET13 1020 20
11290 Angle20 SET13 1020 20
11291 Angle20 SET13 1020 20
11292 Angle20 SET13 1020 20
11293 Angle20 SET13 1020 20
11294 Angle20 SET13 1020 20
11295 Angle20 SET13 1020 20
11296 Angle20 SET13 1020 20
11297 Angle20 SET13 1020 20
11298 Angle20 SET13 1020 20
11299 Angle20 SET13 1020 20
11300 Angle20 SET13 1020 20
11301 Angle20 SET13 1020 20
11302 Angle20 SET13 1020 20
11303 Angle20 SET13 1020 20
11304 Angle20 SET13 1020 20
11561 Angle25 SET13 1020 25
11562 Angle25 SET13 1020 25
11563 Angle25 SET13 1020 25
11564 Angle25 SET13 1020 25
11565 Angle25 SET13 1020 25
11566 Angle25 SET13 1020 25
11567 Angle25 SET13 1020 25
11568 Angle25 SET13 1020 25
11569 Angle25 SET13 1020 25
11570 Angle25 SET13 1020 25
11571 Angle25 SET13 1020 25
11572 Angle25 SET13 1020 25
11380 Angle30 SET13 1020 30
11381 Angle30 SET13 1020 30
11382 Angle30 SET13 1020 30
11383 Angle30 SET13 1020 30
11384 Angle30 SET13 1020 30
11385 Angle30 SET13 1020 30
11386 Angle30 SET13 1020 30
11387 Angle30 SET13 1020 30
11388 Angle30 SET13 1020 30
11389 Angle30 SET13 1020 30
11574 Angle35 SET13 1020 35
11575 Angle35 SET13 1020 35
11576 Angle35 SET13 1020 35
11577 Angle35 SET13 1020 35
11578 Angle35 SET13 1020 35
11579 Angle35 SET13 1020 35
11580 Angle35 SET13 1020 35
11581 Angle35 SET13 1020 35
11582 Angle35 SET13 1020 35
11583 Angle35 SET13 1020 35
11584 Angle35 SET13 1020 35
11585 Angle35 SET13 1020 35
11586 Angle35 SET13 1020 35
11587 Angle35 SET13 1020 35
11588 Angle35 SET13 1020 35
11589 Angle35 SET13 1020 35
11393 Angle40 SET13 1020 40
11394 Angle40 SET13 1020 40
11395 Angle40 SET13 1020 40
11396 Angle40 SET13 1020 40
11397 Angle40 SET13 1020 40
11398 Angle40 SET13 1020 40
11399 Angle40 SET13 1020 40
11400 Angle40 SET13 1020 40
11401 Angle40 SET13 1020 40
11402 Angle40 SET13 1020 40
11403 Angle40 SET13 1020 40
11404 Angle40 SET13 1020 40
11405 Angle40 SET13 1020 40
11406 Angle40 SET13 1020 40
11407 Angle40 SET13 1020 40
11591 Angle45 SET13 1020 45
11592 Angle45 SET13 1020 45
11593 Angle45 SET13 1020 45
11594 Angle45 SET13 1020 45
11595 Angle45 SET13 1020 45
11596 Angle45 SET13 1020 45
11597 Angle45 SET13 1020 45
11598 Angle45 SET13 1020 45
11599 Angle45 SET13 1020 45
11600 Angle45 SET13 1020 45
11601 Angle45 SET13 1020 45
11602 Angle45 SET13 1020 45
11603 Angle45 SET13 1020 45
11604 Angle45 SET13 1020 45
11605 Angle45 SET13 1020 45
11408 Angle50 SET13 1020 50
11409 Angle50 SET13 1020 50
11410 Angle50 SET13 1020 50
11411 Angle50 SET13 1020 50
11412 Angle50 SET13 1020 50
11413 Angle50 SET13 1020 50
11414 Angle50 SET13 1020 50
11415 Angle50 SET13 1020 50
11416 Angle50 SET13 1020 50
11417 Angle50 SET13 1020 50
11418 Angle50 SET13 1020 50
11419 Angle50 SET13 1020 50
11420 Angle50 SET13 1020 50
11421 Angle50 SET13 1020 50
11422 Angle50 SET13 1020 50
11423 Angle50 SET13 1020 50
11607 Angle55 SET13 1020 55
11608 Angle55 SET13 1020 55
11609 Angle55 SET13 1020 55
11610 Angle55 SET13 1020 55
11611 Angle55 SET13 1020 55
11612 Angle55 SET13 1020 55
11613 Angle55 SET13 1020 55
11614 Angle55 SET13 1020 55
11615 Angle55 SET13 1020 55
11616 Angle55 SET13 1020 55
11617 Angle55 SET13 1020 55
11618 Angle55 SET13 1020 55
11619 Angle55 SET13 1020 55
11620 Angle55 SET13 1020 55
11621 Angle55 SET13 1020 55
11622 Angle55 SET13 1020 55
11623 Angle55 SET13 1020 55
11624 Angle55 SET13 1020 55
11425 Angle60 SET13 1020 60
11426 Angle60 SET13 1020 60
11427 Angle60 SET13 1020 60
11428 Angle60 SET13 1020 60
11429 Angle60 SET13 1020 60
11430 Angle60 SET13 1020 60
11431 Angle60 SET13 1020 60
11432 Angle60 SET13 1020 60
11433 Angle60 SET13 1020 60
11434 Angle60 SET13 1020 60
11435 Angle60 SET13 1020 60
11436 Angle60 SET13 1020 60
11437 Angle60 SET13 1020 60
11438 Angle60 SET13 1020 60
11439 Angle60 SET13 1020 60
11440 Angle60 SET13 1020 60
11441 Angle60 SET13 1020 60
11442 Angle60 SET13 1020 60
11443 Angle60 SET13 1020 60
11444 Angle60 SET13 1020 60
11653 Angle65 SET13 1020 65
11654 Angle65 SET13 1020 65
11655 Angle65 SET13 1020 65
11656 Angle65 SET13 1020 65
11657 Angle65 SET13 1020 65
11658 Angle65 SET13 1020 65
11659 Angle65 SET13 1020 65
11660 Angle65 SET13 1020 65
11661 Angle65 SET13 1020 65
11662 Angle65 SET13 1020 65
11663 Angle65 SET13 1020 65
11664 Angle65 SET13 1020 65
11665 Angle65 SET13 1020 65
11666 Angle65 SET13 1020 65
11667 Angle65 SET13 1020 65
11668 Angle65 SET13 1020 65
11669 Angle65 SET13 1020 65
11670 Angle65 SET13 1020 65
11671 Angle65 SET13 1020 65
11672 Angle65 SET13 1020 65
11673 Angle65 SET13 1020 65
11674 Angle65 SET13 1020 65
11675 Angle65 SET13 1020 65
11676 Angle65 SET13 1020 65
11677 Angle65 SET13 1020 65
11678 Angle65 SET13 1020 65
11679 Angle65 SET13 1020 65
11680 Angle65 SET13 1020 65
11681 Angle65 SET13 1020 65
11682 Angle65 SET13 1020 65
11683 Angle65 SET13 1020 65
11684 Angle65 SET13 1020 65
11685 Angle65 SET13 1020 65
11686 Angle65 SET13 1020 65
11687 Angle65 SET13 1020 65
11446 Angle70 SET13 1020 70
11447 Angle70 SET13 1020 70
11448 Angle70 SET13 1020 70
11449 Angle70 SET13 1020 70
11450 Angle70 SET13 1020 70
11451 Angle70 SET13 1020 70
11452 Angle70 SET13 1020 70
11453 Angle70 SET13 1020 70
11454 Angle70 SET13 1020 70
11455 Angle70 SET13 1020 70
11456 Angle70 SET13 1020 70
11457 Angle70 SET13 1020 70
11458 Angle70 SET13 1020 70
11459 Angle70 SET13 1020 70
11460 Angle70 SET13 1020 70
11461 Angle70 SET13 1020 70
11462 Angle70 SET13 1020 70
11463 Angle70 SET13 1020 70
11464 Angle70 SET13 1020 70
11465 Angle70 SET13 1020 70
11466 Angle70 SET13 1020 70
11467 Angle70 SET13 1020 70
11468 Angle70 SET13 1020 70
11469 Angle70 SET13 1020 70
11470 Angle70 SET13 1020 70
11471 Angle70 SET13 1020 70
11472 Angle70 SET13 1020 70
11473 Angle70 SET13 1020 70
11474 Angle70 SET13 1020 70
11475 Angle70 SET13 1020 70
11476 Angle70 SET13 1020 70
11477 Angle70 SET13 1020 70
11478 Angle70 SET13 1020 70
11479 Angle70 SET13 1020 70
11480 Angle70 SET13 1020 70
11482 Angle75 SET13 1020 75
11483 Angle75 SET13 1020 75
11484 Angle75 SET13 1020 75
11485 Angle75 SET13 1020 75
11486 Angle75 SET13 1020 75
11487 Angle75 SET13 1020 75
11488 Angle75 SET13 1020 75
11489 Angle75 SET13 1020 75
11490 Angle75 SET13 1020 75
11491 Angle75 SET13 1020 75
11492 Angle75 SET13 1020 75
11493 Angle75 SET13 1020 75
11494 Angle75 SET13 1020 75
11495 Angle75 SET13 1020 75
11496 Angle75 SET13 1020 75
11497 Angle75 SET13 1020 75
11498 Angle75 SET13 1020 75
11499 Angle75 SET13 1020 75
11500 Angle75 SET13 1020 75
11501 Angle75 SET13 1020 75
11502 Angle75 SET13 1020 75
11503 Angle75 SET13 1020 75
11504 Angle75 SET13 1020 75
11505 Angle75 SET13 1020 75
11506 Angle75 SET13 1020 75
11507 Angle75 SET13 1020 75
11508 Angle75 SET13 1020 75
11509 Angle75 SET13 1020 75
11510 Angle75 SET13 1020 75
11511 Angle75 SET13 1020 75
11512 Angle75 SET13 1020 75
11513 Angle75 SET13 1020 75
11514 Angle75 SET13 1020 75
11515 Angle75 SET13 1020 75
11516 Angle75 SET13 1020 75
11517 Angle75 SET13 1020 75
11518 Angle75 SET13 1020 75
11519 Angle75 SET13 1020 75
11520 Angle75 SET13 1020 75
11521 Angle75 SET13 1020 75
11522 Angle75 SET13 1020 75
11305 Angle80 SET13 1020 80
11306 Angle80 SET13 1020 80
11307 Angle80 SET13 1020 80
11308 Angle80 SET13 1020 80
11309 Angle80 SET13 1020 80
11310 Angle80 SET13 1020 80
11311 Angle80 SET13 1020 80
11312 Angle80 SET13 1020 80
11313 Angle80 SET13 1020 80
11314 Angle80 SET13 1020 80
11315 Angle80 SET13 1020 80
11316 Angle80 SET13 1020 80
11317 Angle80 SET13 1020 80
11318 Angle80 SET13 1020 80
11319 Angle80 SET13 1020 80
11320 Angle80 SET13 1020 80
11321 Angle80 SET13 1020 80
11322 Angle80 SET13 1020 80
11323 Angle80 SET13 1020 80
11324 Angle80 SET13 1020 80
11325 Angle80 SET13 1020 80
11326 Angle80 SET13 1020 80
11327 Angle80 SET13 1020 80
11328 Angle80 SET13 1020 80
11329 Angle80 SET13 1020 80
11330 Angle80 SET13 1020 80
11331 Angle80 SET13 1020 80
11332 Angle80 SET13 1020 80
11333 Angle80 SET13 1020 80
11334 Angle80 SET13 1020 80
11335 Angle80 SET13 1020 80
11336 Angle80 SET13 1020 80
11337 Angle80 SET13 1020 80
11338 Angle80 SET13 1020 80
11339 Angle80 SET13 1020 80
11340 Angle80 SET13 1020 80
11341 Angle80 SET13 1020 80
11342 Angle80 SET13 1020 80
11343 Angle80 SET13 1020 80
11344 Angle80 SET13 1020 80
11345 Angle80 SET13 1020 80
11346 Angle80 SET13 1020 80
11347 Angle80 SET13 1020 80
11348 Angle80 SET13 1020 80
11349 Angle80 SET13 1020 80
11350 Angle80 SET13 1020 80
11351 Angle80 SET13 1020 80
11352 Angle80 SET13 1020 80
11353 Angle80 SET13 1020 80
11354 Angle80 SET13 1020 80
11355 Angle80 SET13 1020 80
11356 Angle80 SET13 1020 80
11357 Angle80 SET13 1020 80
11358 Angle80 SET13 1020 80
11359 Angle80 SET13 1020 80
11360 Angle80 SET13 1020 80
11361 Angle80 SET13 1020 80
11362 Angle80 SET13 1020 80
11363 Angle80 SET13 1020 80
11364 Angle80 SET13 1020 80
11365 Angle80 SET13 1020 80
11366 Angle80 SET13 1020 80
11367 Angle80 SET13 1020 80
11368 Angle80 SET13 1020 80
11369 Angle80 SET13 1020 80
11370 Angle80 SET13 1020 80
11371 Angle80 SET13 1020 80
11372 Angle80 SET13 1020 80
This diff is collapsed.
......@@ -10,6 +10,7 @@ BasicTracking::BasicTracking(Configuration config, std::vector<Detector*> detect
// Default values for cuts
timingCut = m_config.get<double>("timingCut", Units::convert(200, "ns"));
timingCut_DUT = m_config.get<double>("timingCutDUT", Units::convert(200, "ns"));
spatialCut = m_config.get<double>("spatialCut", Units::convert(0.2, "mm"));
spatialCut_DUT = m_config.get<double>("spatialCutDUT", Units::convert(0.2, "mm"));
minHitsOnTrack = m_config.get<int>("minHitsOnTrack", 6);
......@@ -30,8 +31,7 @@ void BasicTracking::initialise() {
for(auto& detector : get_detectors()) {
// Check if they are a Timepix3
string detectorID = detector->name();
if(detector->type() != "Timepix3")
continue;
string name = "residualsX_" + detectorID;
residualsX[detectorID] = new TH1F(name.c_str(), name.c_str(), 500, -0.1, 0.1);
name = "residualsXwidth1_" + detectorID;
......@@ -49,6 +49,8 @@ void BasicTracking::initialise() {
name = "residualsYwidth3_" + detectorID;
residualsYwidth3[detectorID] = new TH1F(name.c_str(), name.c_str(), 500, -0.1, 0.1);
}
associatedClusters = 0;
}
StatusCode BasicTracking::run(Clipboard* clipboard) {
......@@ -67,15 +69,11 @@ StatusCode BasicTracking::run(Clipboard* clipboard) {
bool firstDetector = true;
std::string seedPlane;
for(auto& detector : get_detectors()) {
// Check if they are a Timepix3
string detectorID = detector->name();
if(detector->type() != "Timepix3")
continue;
// Get the clusters
Clusters* tempClusters = (Clusters*)clipboard->get(detectorID, "clusters");
if(tempClusters == NULL) {
if(tempClusters == NULL || tempClusters->size() == 0) {
LOG(DEBUG) << "Detector " << detectorID << " does not have any clusters on the clipboard";
} else {
// Store them
......@@ -86,8 +84,7 @@ StatusCode BasicTracking::run(Clipboard* clipboard) {
LOG(DEBUG) << "Seed plane is " << seedPlane;
firstDetector = false;
}
if(tempClusters->size() == 0)
continue;
KDTree* clusterTree = new KDTree();
clusterTree->buildTimeTree(*tempClusters);
trees[detectorID] = clusterTree;
......@@ -117,20 +114,25 @@ StatusCode BasicTracking::run(Clipboard* clipboard) {
// Get the cluster time
long long int timestamp = cluster->timestamp();
// Loop over each subsequent plane and look for a cluster within 100 ns
// Loop over each subsequent plane and look for a cluster within the timing cuts
for(auto& detectorID : detectors) {
// Check if the DUT should be excluded and obey:
if(excludeDUT && detectorID == m_config.get<std::string>("DUT")) {
// Keep all DUT clusters, so we can add them as associated clusters later:
dutClusters = trees[detectorID]->getAllClustersInTimeWindow(cluster, timingCut);
// Keep all DUT clusters, so we can add them as associated clusters later, that are within the DUT timing
// cut:
dutClusters = trees[detectorID]->getAllClustersInTimeWindow(cluster, timingCut_DUT);
LOG(DEBUG) << "Got " << dutClusters.size() << " DUT clusters within "
<< Units::display(timingCut_DUT, {"ms", "us", "ns"});
continue;
}
if(detectorID == seedPlane)
continue;
if(trees.count(detectorID) == 0)
continue;
// Get all neighbours within 200 ns
// Get all neighbours within the timing cut
LOG(DEBUG) << "Searching for neighbouring cluster on " << detectorID;
LOG(DEBUG) << "- cluster time is " << Units::display(cluster->timestamp(), {"ns", "us", "s"});
Cluster* closestCluster = NULL;
......@@ -224,13 +226,14 @@ StatusCode BasicTracking::run(Clipboard* clipboard) {
ROOT::Math::XYZPoint intercept = track->intercept(dutcluster->globalZ());
double xdistance = intercept.X() - dutcluster->globalX();
double ydistance = intercept.Y() - dutcluster->globalY();
if(abs(xdistance) > spatialCut_DUT)
continue;
if(abs(ydistance) > spatialCut_DUT)
if(abs(xdistance) > spatialCut_DUT || abs(ydistance) > spatialCut_DUT) {
LOG(DEBUG) << "Discarding DUT cluster with distance (" << abs(xdistance) << "," << abs(ydistance) << ")";
continue;
}
LOG(DEBUG) << "Found associated cluster";
LOG(DEBUG) << "Found associated cluster with distance (" << abs(xdistance) << "," << abs(ydistance) << ")";
track->addAssociatedCluster(dutcluster);
associatedClusters++;
}
}
......@@ -265,4 +268,6 @@ Cluster* BasicTracking::getNearestCluster(long long int timestamp, Clusters clus
return bestCluster;
}
void BasicTracking::finalise() {}
void BasicTracking::finalise() {
LOG(INFO) << "Found " << associatedClusters << " associated clusters for detector " << m_config.get<std::string>("DUT");
}
......@@ -25,6 +25,7 @@ namespace corryvreckan {
StatusCode run(Clipboard* clipboard);
void finalise();