pixel geometry for misalignment work

The latest version of the PXL (PixlGeo4.xml, in dev13, dev14) has only sectors and ladders. For (mis)alignment work, instead of a full active ladder (20cm *2 cm active silicon), 10 wafers (2*2cm) / ladder have been implemented.
  1. creation of the new PXL geometry
  2. get the proper GEANT hit decoding
  3. create geometry tables
  4. run the BFC chain with correct sector/ladder/wafer decoding
  5. run the alignment code
1. Creation of the new PXL geom.

2. Geant decoding
Since there is now wafers, the geant decoding from geant_Id to (sector,ladder,wafer) is :

 int sector  =  VOLID/1000000; // [1-10]                                                                                                                          
 int ladder  = (VOLID%1000000)/10000; //[1-4]                                                                                                                     
 int wafer   = (VOLID - sector*1000000 - ladder*10000)/100; //[1-10]                                                                                                                        Path= Form("/HALL_1/CAVE_1/PXMO_1/PXLA_%i/LADR_%i/PLAC_%i",sector,ladder,wafer);

3. Geometry Tables.

Rotation matrices for all wafers are taken from the root geometry, PLAC volume (active silicon) is the target.
PxlLaddersOnSectors has 40 entries (1 per ladder)
The positionning of wafers on a ladder is coded in PxlWafersOnLadders (see below). A unique Id ( based on sector/ladder/wafer) is assigned for each wafer. It will be used in StPxlDbMaker

TDataSet *CreateTable() 

{ 

  // -----------------------------------------------------------------

  // 

  cout <<" CreateTable::PxlWafersOnLadders : " << endl;

  // Positioning of the PXL wafers in the PXL ladder coordinate systems

  if (!gROOT->GetClass("St_Survey")) return 0;

  Survey_st row = {0, 1,0,0, 0,1,0, 0,0,1,  0,0,0, .1,.1,.1,.002,.1,.002,"Ideal"};

  const Int_t NSECTOR = 10;

  const Int_t NLADDER = 4;

  const Int_t NWAFER  = 10;

  Float_t ZPOS[10] = {-9.04, -7.04, -5.04, -3.04, -1.04, .96, 2.96, 4.96, 6.96, 8.96};

  Int_t id      = 0 ;

  Int_t layer   = 0;

  Int_t counter = 0;

  St_Survey *tableSet = new St_Survey("PxlWafersOnLadders",NSECTOR*NLADDER*NWAFER);

  for (Int_t sector = 0; sector <NSECTOR; sector++) 

        {

          for (Int_t ladder = 0; ladder <NLADDER; ladder++) 

            {

              for (Int_t wafer = 0; wafer < NWAFER; wafer++) 

                {

                  (ladder==3)?layer=1:layer=2;

                  row.Id = layer*1000 + sector*100 + ladder*10 + wafer ;

                  row.t2 = ZPOS[wafer];

                  tableSet->AddAt(&row.Id);

                  id = layer*1000 + sector*100 + ladder*10 + wafer ;

                  ++counter;

                  cout <<" id/sector/ladder/wafer : " << id <<"/"<<sector<<"/"<<ladder<<"/"<<wafer<<endl;

                }

            }

        }

  cout << counter <<" have been added for the PXL in the Rotation matrices list "<< endl;

  return (TDataSet *)tableSet;

}


note to myself : to get the position along the Z axis, run LoopOverTGeo over all wafers to check the Z position (= center of the wafer)