Commit a39176f3 authored by Daniel Hynds's avatar Daniel Hynds
Browse files

added response histograms (top hat plots)

Former-commit-id: 6eb585e02fd4b6653a6de48d058f2817e61521cf
parent e29b1152
......@@ -226,7 +226,7 @@ StatusCode ClicpixAnalysis::run(Clipboard* clipboard){
// Some test plots of pixel response function
// fillResponseHistos(chipInterceptRow,chipInterceptCol,trackIntercept.X(),trackIntercept.Y(),(*bestCluster));
// Add this cluster to the list of associated clusters held by this track. This will allow alignment to take place
......@@ -426,4 +426,27 @@ void ClicpixAnalysis::fillClusterHistos(Clusters* clusters){
// Sub-routine to look at pixel response, ie. how far from the pixel is the track intercept for the pixel to still see charge
void ClicpixAnalysis::fillResponseHistos(double trackInterceptX, double trackInterceptY, Cluster* cluster){
// Loop over pixels in the cluster and show their distance from the track intercept
Pixels pixels = cluster->pixels();
Pixels::iterator itp;
for (itp = pixels.begin(); itp != pixels.end(); itp++) {
// Get the pixel
Pixel* pixel = (*itp);
// Get the pixel local then global position
PositionVector3D<Cartesian3D<double> > pixelPositionLocal = parameters->detector[dutID]->getLocalPosition(pixel->m_row,pixel->m_column);
PositionVector3D<Cartesian3D<double> > pixelPositionGlobal = *(parameters->detector[dutID]->m_localToGlobal) * pixelPositionLocal;
// Fill the response histograms
hPixelResponseX->Fill( pixelPositionGlobal.X() - trackInterceptX );
hPixelResponseY->Fill( pixelPositionGlobal.Y() - trackInterceptY );
......@@ -21,6 +21,7 @@ public:
bool checkMasked(double, double);
void fillClusterHistos(Clusters*);
bool checkProximity(Track*, Tracks*);
void fillResponseHistos(double, double, Cluster*);
// Cluster/pixel histograms
TH2F* hHitPixels;
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