Test of TPS (thin plane spline) correction in StPxlFastMaker

  1. hit global -->local
  2. change Z local with respect its X and Y local coordinates mapped by TPS ( already filled  for each sensor )
 from Hao's code :
          double local[3];
          double global[3];       
          local[0] = firstPixelX + pxlPixelSize*cluster->columnCenter;
          local[1] = firstPixelY + pxlPixelSize*cluster->rowCenter;
          local[2] = tps[i][j][k]->Z(local[0], local[1]);
where i,j,k being indexes of the current sector, ladder and sensor.
local[0] and local[1] the local coordinates of hits in the sensor (-20;20) microns


Note : there is a slight difference of notation used in stPxlFastMaker :
               Double_t globalPixHitPos[3] = {mcPix->position().x(), mcPix->position().y(), mcPix->position().z()};
               Double_t localPixHitPos[3]  = {0, 0, 0};
               gGeoManager->GetCurrentMatrix()->MasterToLocal(globalPixHitPos, localPixHitPos);
MasterToLocal() returns X and Z local coordinates non-zero, Y local is 0.
So to be consistent the TPS correction is done as :
 double testTps = tps[sector-1][ladder-1][sensor-1]->Z(localPixHitPos[0], localPixHitPos[2]);
I then look at the differences
  1. MC hit --> local --> no TPS --> global(x,y,z)
  2. MC hit --> local --> Y changed by TPS --> global(x',y',z')
1. Local coordinates with no TPS

note/question : why yL is not 0 ? 
It looks like GEANT (or the MasterToLocal() transfo is placing the hits at the edges of the PLAC volume

From PixlGeo5.xml :
<Volume name="PLAC" comment="active silicon top sector"  >
    <Attribute for="PLAC" seen="1" colo="600"  />
    <Material name="Silicon"  />
    <Material name="SSensitive" isvol="1"/>
    <Shape type="BOX" dz="0.9936" dx="0.9605" dy="0.0025" />
dY = 0.0025 cm (25 microns) which could match with the range of the histo.


2. Local coordinates with TPS : only yL is affected ; notice also the range.

3. Differences x-x', y-y',z-z' (global)

4. Differences x-x', y-y',z-z' (global) with ylocal = 0 (non TPS case)

Setting yLocal = 0 (to avoid the double peak) has no consequences (or very few, box of histograms) on X,Y,Z global

4) Geometry Test
From Flemming : LADR volume has a precision (epsilon = 1 micron) which will be inherited by daughter volumes to LADR

<!--  BOX for silicon active ladders  --> 
    <Volume name="LADR" comment="first ladder prototype"> 
    <Medium name ="MedAir" epsil="0.001"/> 
    <Attribute for="LADR" seen="1" colo="920"/> 
    <Shape type="BOX" dx="1.245" dy="0.05225" dz="15.325" /> 
    <Do var="sens" from="1" to="SENP_sensor"> 
      zsensor = SENP_zpos(sens) 
      <Create block="PXSI"/> 
      <Placement in="LADR" x="-0.0848" y="-0.009975" z="zsensor" block="PXSI"> 
      </Placement> 
    </Do> 


  I have rerun simulations (50events, 200 pions/event) and now yLocal shows 2 peaks at +/- 1 microns