TKR Alignment Calibration Support (revised)

Changes from the earlier (March 17) version of this document are indicated like this.

File format

The current ascii file format needs to be translated to xml. Since the alignment internal to a tower is expected to be much more stable than alignment between towers, they will be kept as separate calibrations. The formats will be defined in such a way that internal alignment information may only be kept in the InternalAlignment calibration and inter-tower alignment constants will only appear in the TowerAlignment calibration.

The inter-tower calibration might look something like this:

<tkrTowerAlignment instrument="LAT">
  <tower id="0" disp="21.1 -0.3 0.8" rot="0.1 0.2 -0.05" />
  <tower id="1" disp=".. " rot=".. " />
            ...
  <tower id="15" disp=".. " rot=".. " />
</tkrTowerAlignment >

Here is a sample file for internal alignment:

<tkrInternalAlignment instrument="LAT">
  <towerInternal id="0">
    <tray id="0" disp=".. " rot=".. ">  
      <face id="0" disp="-2.1 0 0.3" rot=".. " > 
        <ladder id="0" disp=".. " rot=".. " >
          <wafer id="0" disp=".. " rot=".. " />
          <wafer id="1" disp=".. " rot=".. " /> 
        </ladder>
        <ladder id="2" disp=".. " rot=".. " > 
             ..
        </ladder>
      </face>
    </tray>
    <tray id="3" >
      <face id="0" .. />
      <face id="1" .. />
    </tray>
    <tray id="11 " >
      ..
    </tray>
    ..
  </towerInternal>
  <towerInternal id="3">
     ..
  </towerInternal>
  ...
  <towerInternal id="9">
     ..
  </towerInternal>
  ...

</tkrInternalAlignement>

Notes

  1. The <tray> element has disp and rot attributes even though, in practice, there is unlikely to be any procedure to measure them.
  2. For completeness <ladder> and <wafer> are included just in case we need to keep track at that level.
  3. Both disp and rot would have default values of "0.0 0.0 0.0"
  4. Omitted towers, trays, etc. would be interpreted as perfectly aligned.
  5. Perhaps the top-level element <tkrInternalAlignment> should have attributes nTower, nTray, etc. with defaults appropriate for the flight instrument. For <tkrTowerAlignment> only nTower would be needed.

Program interface

As with other calibrations, CalibSvc would be responsible for reading in files appropriate for the events being processed and keeping the information in the (calibration) TDS. CalibSvc will not interpret the information; that is most reliably done by the client — presumably TkrUtil — which understands its significance. In particular, CalibSvc (or, rather, the data classes in CalibData) should not attempt to, for example, compose alignment information for tower and tray. The public interface might be something like this:

#include "CLHEP/Vector/Hep3vector.h"

namespace CalibData {

  class TkrInternalAlignment {
   
    public:
      ...

      int getTrayAlign(unsigned towerId, unsigned trayId,
                       CLHEP::Hep3Vector& disp,
                       CLHEP::Hep3Vector& rot);

      int getFaceAlign(unsigned towerId, unsigned trayId, unsigned faceId,
                       CLHEP::Hep3Vector& disp,
                       CLHEP::Hep3Vector& rot);
      int getLadderAlign(unsigned towerId, unsigned trayId, unsigned faceId,
                         unsigned ladder,
                         CLHEP::Hep3Vector& disp,
                         CLHEP::Hep3Vector& rot);
      int getWaferAlign(unsigned towerId, unsigned trayId, unsigned faceId,
                        unsigned ladder, unsigned wafer,
                        CLHEP::Hep3Vector& disp,
                        CLHEP::Hep3Vector& rot);


          ..
  };
  class TkrTowerAlignment {
   
    public:
      ...

      int getTowerAlign(unsigned id, CLHEP::Hep3Vector& disp,
                        CLHEP::Hep3Vector& rot);

         ..
  };
}

The routines would return 3-vectors of zeros for any elements not explicitly mentioned in the xml file. Maybe there should also be a way to get all constants of a a certain sort: for example, a vector of all the top-level tower constants, or of all the tray constants for a fixed tower.


First created 17 March 2008

Last modified:

J. Bogart