Alignment tables (PXL) : y2013

global alignment :

PxlLaddersOnSectors.y2013.C  
PxlOnGlobal.y2013.C  
PxlSectorsOnGlobal.y2013.C  
PxlSensorsOnLadders.y2013.C

first step : create a y2013.h file that contains the geometry tree ( GEANT volumes path ) :
to do this , you have to run starsim and type the following commands :
note : for y2013, you have to be in DEV library (type stardev to swithc to DEV)

 detp geom y2013

 gexec $STAR_LIB/xgeometry.so

 gclos all

 grfile y2013.rz

 quit

After this step, a file y2013.rz is created in your directory. Then the command line to produce the .h file is (from the terminal) :

g2root y2013.rz
note : the command line above creates .C file ; you can just rename the file with .h extension

It's a good thing to place this file (y2013.h) in a same tree structure as the tree used for reconstruction :
StarDb/AgiGeometry
StarDb/AgMLGeometry

So you can download these 2 directories from CVS :

cvs co StarDb/AgiGeometry
cvs co StarDb/AgMLGeometry

note :
1. a file Geometry.y2013.C has to be created also in StarDb/AgiGeometry ( make a copy from any other file and change to y2013)
2. put the y2013.h file in your private StarDb/AgiGeometry

MAcro : LoopOverPxlInner to find the rotations/translations parameters 

  .L StarDb/AgiGeometry/Geometry.y2013.C

  CreateTable()

  .x LoopOverTgeo.C

Write the results into the tables.
  1. the macro spits out the parameters for all sensors ( 10 sectors * 4 ladders * 10 sensors)
  2. however the global parameters are written for a given ladder ( rot, translation ) in the table PxlLaddersOnSectors
  3. the z position of the 10 sensors , in a given ladder, are written in PxlSensorsOnLadders using the following positions 
  const Int_t NSECTOR = 10;

  const Int_t NLADDER = 4;

  const Int_t NSENSOR  = 10;

  Float_t ZPOS[NSENSOR] = {-9.1170, -7.0910, -5.0650, -3.0390, -1.0130, 1.0130, 3.0390, 5.0650, 7.0910, 9.1170};