StPxlRawHitMaker : review

  •  code is at :
/star/institutions/ksu/bouchet/PXLRAWHITMAKER/offline/hft/StRoot

This blog entry only explains the use of pxlRowColumnStatus and pxlSensorStatus tables used in StPxlRawHitMaker.
Details for these 2 tables can be found here and here, based on Dmitry's proposal 

The tables are retrieved in
Int_t StPxlRawHitMaker::InitRun(Int_t runnumber)

2 booleans (doCalibSensor and doCalibRowColumn) are initialized to false :
  • if tables are found, they are changed to true (means use the tables for masking sensors and/or rows/column
  • if no tables are found, they remain false
They are respectively used in 
void StPxlRawHitMaker::DecodeWord(UInt_ val)
and
void StPxlRawhitMaker::DecodeStateN(Int_t val)

In the first method : if doCalibSensor == true and of the flag of sensor is >0 and < 10, pxlRawHitCollection are filled in this sensor.
In doCalibSensor == false (means no table), no selection is done about the sensor's flag --> pxlRawHitCollection is done for all sensors

In the second method, if doCalibRowColumn is true, we retrieve the status of each column and row that make a StPxlRawHit.
If the status is 1, booleans passCol and passRow switch to true (it means good row and good column)
If doCalibRowColumn is false, passCol and passRow are automatically set to true
  • Coding of row/column 
col_Id  = 928 * sensor_Id + current column
row_Id = 960 * sensor_Id + current row
with 0 < sensor_Id < 400
0< current column < 960
0< current row < 928

  • Instructions to run :
  1. get the PXL codes from offline/hft
  2. get the updated StPxlRawHitMaker from /star/institutions/ksu/bouchet/PXLRAWHITMAKER/offline/hft/StRoot/StPxlRawHitMaker
  3. copy /star/institutions/ksu/bouchet/PXLRAWHITMAKER/offline/hft/StarDb : it contains 2 tables (pxlRowColumnStatus and pxlSensorStatus)
  4. compile
  5. copy and run the bfc chain script : /star/institutions/ksu/bouchet/PXLRAWHITMAKER/offline/hft/runBFC.sh
  • update : 09/25
To avoid hard-coded values to choose on the status of the sensor and row/column, it was advised to define them in StPxlUtil/StPxlConstants.h

const int nPxlSectors = 10; 
const int nPxlLaddersPerSector = 4; 
const int nPxlSensorsPerLadder = 10; 
const int nPxlColumnsOnSensor = 960; 
const int nPxlRowsOnSensor = 928; 
const float pxlPixelSize = 20.7e-4; 
const float pxlCenterOfDiodeZ = 5.5e-4; 
const float pxlCenterOfDiodeX = 15.1e-4; 
const int pxlSensorGoodStatusMin = 0;   const int pxlSensorGoodStatusMax = 10;   const int pxlRowColumnGoodStatus =1; 

Then the selection of good sensor looks like :
 if(((doCalibSensor == true) && 
          (sensorStatus[(m_sector-1)*40 + (m_ladder-1)*10 + (m_sensor-1)] >pxlSensorGoodStatusMin ) && 
          (sensorStatus[(m_sector-1)*40 + (m_ladder-1)*10 + (m_sensor-1)] <pxlSensorGoodStatusMax )) || 
         (doCalibSensor == false)) 
        DecodeStateN(val0); 
and the selection of good rows/columns :
if ( gotCol == mapCol.end() ) { 
          passCol=false; 
        } else { 
          if(gotCol->second==pxlRowColumnGoodStatus) {passCol = true;} 
        } 
Codes at 
/star/institutions/ksu/bouchet/PXLRAWHITMAKER/offline/hft/StRoot
  have been updated with Hao's recent updates