The current ascii file format needs to be translated to xml. It might look something like this:
<tower id="0" disp="21.1 -0.3 0.8" rot="0.1 0.2 -0.05" > <tray id="0" > <face id="0" disp="-2.1 0 0.3" rot=".. " /> </tray> <tray id="3" > <face id="0" .. /> <face id="1" .. /> </tray> <tray id="11 " > .. </tray> .. </tower> <tower id="3" .. > .. </tower> ... <tower id="9" .. > .. </tower> ... </tkrAlignement
<tray> element could also have
disp and rot attributes if that's useful.<wafer>, could be
added if, heaven help us, we need to keep track at that level.disp and rot would have default values
of "0.0 0.0 0.0"<tkrAlignment should
have attributes nTower, nTray, etc. with defaults
appropriate for the flight instrument.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 TkrAlignment {
public:
...
int getTowerAlign(unsigned id, CLHEP::Hep3Vector& disp,
CLHEP::Hep3Vector& disp);
int getTrayAlign(unsigned towerId, unsigned trayId,
CLHEP::Hep3Vector& disp,
CLHEP::Hep3Vector& disp);
int getFaceAlign(unsigned towerId, unsigned trayId, unsigned faceId,
CLHEP::Hep3Vector& disp,
CLHEP::Hep3Vector& disp);
..
};
}
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.
Last modified:
J. Bogart