Commit d5351af9 authored by Matthew Daniel Buckland's avatar Matthew Daniel Buckland
Browse files

Merge branch 'master' of ssh://gitlab.cern.ch:7999/CLICdp/tbAnalysis


Former-commit-id: c16e4e302f416c6b9668a946f47216690f483c81
parents b6cddafe 454d0031
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
ClicpixAnalysis::ClicpixAnalysis(bool debugging) ClicpixAnalysis::ClicpixAnalysis(bool debugging)
: Algorithm("ClicpixAnalysis"){ : Algorithm("ClicpixAnalysis"){
debug = debugging; debug = debugging;
m_associationCut = 0.3; // 300 um m_associationCut = 0.1; // 100 um
m_proximityCut = 0.125; // 125 um m_proximityCut = 0.125; // 125 um
} }
...@@ -114,7 +114,7 @@ void ClicpixAnalysis::initialise(Parameters* par){ ...@@ -114,7 +114,7 @@ void ClicpixAnalysis::initialise(Parameters* par){
hInterceptClusterSize4 = new TH2F("hInterceptClusterSize4","hInterceptClusterSize4",50,0,50,25,0,25); hInterceptClusterSize4 = new TH2F("hInterceptClusterSize4","hInterceptClusterSize4",50,0,50,25,0,25);
// Initialise member variables // Initialise member variables
m_eventNumber = 0; m_triggerNumber = 0; dutID = parameters->DUT; m_eventNumber = 0; m_triggerNumber = 0; dutID = parameters->DUT; m_lostHits = 0.;
} }
...@@ -275,23 +275,26 @@ StatusCode ClicpixAnalysis::run(Clipboard* clipboard){ ...@@ -275,23 +275,26 @@ StatusCode ClicpixAnalysis::run(Clipboard* clipboard){
hInterceptClusterSize4->Fill(pixelInterceptX,pixelInterceptY); hInterceptClusterSize4->Fill(pixelInterceptX,pixelInterceptY);
} }
}else{ }else{
/*
// Search for lost hits. Basically loop through all pixels in all clusters and see if any are close // Search for lost hits. Basically loop through all pixels in all clusters and see if any are close.
// Large clusters (such as from deltas) can pull the cluster centre sufficiently far from the track
bool pixelMatch = false; int size=0; bool pixelMatch = false; int size=0;
for (itc = clusters->begin(); itc != clusters->end(); ++itc) { for (itCorrelate = clusters->begin(); itCorrelate != clusters->end(); ++itCorrelate) {
if (!(*itc)) continue; //if(matched) continue; if(pixelMatch) break;
string chip = (*itc)->detectorId();
// Only look at the clicpix
if(chip != "CLi-CPix") continue;
// Loop over pixels // Loop over pixels
vector<RowColumnEntry*>::const_iterator ith; Pixels::const_iterator itPixel;
for (ith = (*itc)->hits()->begin(); ith != (*itc)->hits()->end(); ++ith) { for (itPixel = (*itCorrelate)->pixels().begin(); itPixel != (*itCorrelate)->pixels().end(); itPixel++) {
// Check if this pixel is within the search window // Get the pixel global position
if( fabs((*ith)->column()-chipInterceptCol) > (residualmaxx/parameters->pixelPitchX["CLi-CPix"]) || PositionVector3D<Cartesian3D<double> > pixelPositionLocal = parameters->detector[dutID]->getLocalPosition((*itPixel)->m_row,(*itPixel)->m_column);
fabs((*ith)->row()-chipInterceptRow) > (residualmaxy/parameters->pixelPitchY["CLi-CPix"]) ) continue; PositionVector3D<Cartesian3D<double> > pixelPositionGlobal = *(parameters->detector[dutID]->m_localToGlobal) * pixelPositionLocal;
// Check if it is close to the track
if( fabs( pixelPositionGlobal.X() - trackIntercept.X() ) > m_associationCut ||
fabs( pixelPositionGlobal.Y() - trackIntercept.Y() ) > m_associationCut ) continue;
pixelMatch=true; pixelMatch=true;
break;
} }
} }
// Increment counter for number of hits found this way // Increment counter for number of hits found this way
...@@ -299,7 +302,6 @@ StatusCode ClicpixAnalysis::run(Clipboard* clipboard){ ...@@ -299,7 +302,6 @@ StatusCode ClicpixAnalysis::run(Clipboard* clipboard){
m_lostHits++; m_lostHits++;
hTrackInterceptsChipLost->Fill(chipInterceptCol,chipInterceptRow); hTrackInterceptsChipLost->Fill(chipInterceptCol,chipInterceptRow);
} }
*/
} }
} }
...@@ -331,9 +333,8 @@ void ClicpixAnalysis::finalise(){ ...@@ -331,9 +333,8 @@ void ClicpixAnalysis::finalise(){
tcout<<"***** Clicpix efficiency calculation *****"<<endl; tcout<<"***** Clicpix efficiency calculation *****"<<endl;
tcout<<"***** ntracks: "<<(int)nTracks<<", nclusters "<<(int)nClusters<<endl; tcout<<"***** ntracks: "<<(int)nTracks<<", nclusters "<<(int)nClusters<<endl;
tcout<<"***** Efficiency: "<<100.*efficiency<<" +/- "<<100.*errorEfficiency<<" %"<<endl; tcout<<"***** Efficiency: "<<100.*efficiency<<" +/- "<<100.*errorEfficiency<<" %"<<endl;
tcout<<"***** If including the "<<(int)m_lostHits<<" lost pixel hits, this becomes "<<100.*(m_lostHits+nClusters)/nTracks<<" %"<<endl;
tcout<<endl; tcout<<endl;
// tcout<<"***** If including the "<<(int)m_lostHits<<" lost pixel hits, this becomes "<<100.*(m_lostHits+nClusters)/nTracks<<" %"<<endl;
} }
......
...@@ -114,6 +114,7 @@ public: ...@@ -114,6 +114,7 @@ public:
map<int,double> m_hitPixels; map<int,double> m_hitPixels;
double m_associationCut; double m_associationCut;
double m_proximityCut; double m_proximityCut;
double m_lostHits;
}; };
......
DetectorID DetectorType nPixelsX nPixelsY PitchX PitchY X Y Z Rx Ry Rz tOffset
W0013_D04 Timepix3 256 256 55 55 -1.478767 0.346595 0.000000 0.237423 3.109694 -0.027045 0.0000000000
W0013_E03 Timepix3 256 256 55 55 -2.641662 0.417953 23.500000 0.229605 3.088721 -0.031547 0.0000000000
W0013_G02 Timepix3 256 256 55 55 -2.268983 0.452596 47.000000 0.202138 3.052174 -0.020592 0.0000000000
W0013_G03 Timepix3 256 256 55 55 0.000000 0.000000 106.500000 0.157000 0.157000 0.000000 0.0000000000
W0013_J05 Timepix3 256 256 55 55 0.555080 -0.503447 128.000000 0.109819 0.183786 0.023296 0.0000000000
W0013_L09 Timepix3 256 256 55 55 -0.877922 0.053954 151.500000 -0.087216 -0.189986 0.001652 0.0000000000
W0019_F07 Timepix3 256 256 55 55 -2.963911 0.779416 77.000000 0.072698 0.024063 0.009783 0.0000000000
This diff is collapsed.
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