X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=STEER%2FAliAlignObj.h;h=c0ffdbf0257a7ad99429a7821864f9b8cd775ee8;hp=9d1afca3bb2f55027027461edb32171bf36170f4;hb=c5304981ab2070d906f10498f4d96d9460b95240;hpb=03b188608d8096312c37630355e33a64bcbb3c30 diff --git a/STEER/AliAlignObj.h b/STEER/AliAlignObj.h index 9d1afca3bb2..c0ffdbf0257 100644 --- a/STEER/AliAlignObj.h +++ b/STEER/AliAlignObj.h @@ -21,6 +21,7 @@ class AliAlignObj : public TObject { AliAlignObj(); AliAlignObj(const AliAlignObj& theAlignObj); AliAlignObj& operator= (const AliAlignObj& theAlignObj); + AliAlignObj& operator*=(const AliAlignObj& theAlignObj); virtual ~AliAlignObj(); enum ELayerID{kInvalidLayer=0, kFirstLayer=1, @@ -42,6 +43,8 @@ class AliAlignObj : public TObject { virtual Bool_t SetRotation(const TGeoMatrix& m) = 0; virtual void SetPars(Double_t x, Double_t y, Double_t z, Double_t psi, Double_t theta, Double_t phi) = 0; + virtual Bool_t SetLocalPars(Double_t x, Double_t y, Double_t z, + Double_t psi, Double_t theta, Double_t phi); virtual void SetMatrix(const TGeoMatrix& m) = 0; void SetVolPath(const TString& volpath) {fVolPath=volpath;} void SetVolUID(UShort_t voluid) {fVolUID=voluid;} @@ -67,6 +70,7 @@ class AliAlignObj : public TObject { static const char* LayerName(Int_t layer) { return fgLayerName[layer]; } static UShort_t LayerToVolUID(ELayerID layerId, Int_t modId); + static UShort_t LayerToVolUID(Int_t layerId, Int_t modId); static ELayerID VolUIDToLayer(UShort_t voluid, Int_t &modId); static ELayerID VolUIDToLayer(UShort_t voluid); @@ -75,14 +79,25 @@ class AliAlignObj : public TObject { ELayerID layerId = VolUIDToLayer(voluid,modId); return GetVolPath(layerId,modId); } - static const char* GetVolPath(ELayerID layerId, Int_t modId) { return fgVolPath[layerId-kFirstLayer][modId]; } + static const char* GetVolPath(ELayerID layerId, Int_t modId); + + Bool_t ApplyToGeometry(); + static Bool_t GetFromGeometry(const char *path, AliAlignObj &alobj); + + static void InitAlignObjFromGeometry(); + static AliAlignObj* GetAlignObj(UShort_t voluid) { + Int_t modId; + ELayerID layerId = VolUIDToLayer(voluid,modId); + return GetAlignObj(layerId,modId); + } + static AliAlignObj* GetAlignObj(ELayerID layerId, Int_t modId); protected: void AnglesToMatrix(const Double_t *angles, Double_t *rot) const; Bool_t MatrixToAngles(const Double_t *rot, Double_t *angles) const; - void InitVolPaths(); + static void InitVolPaths(); //Volume identifiers TString fVolPath; // Volume path inside TGeo geometry @@ -91,7 +106,9 @@ class AliAlignObj : public TObject { static Int_t fgLayerSize[kLastLayer - kFirstLayer]; static const char* fgLayerName[kLastLayer - kFirstLayer]; - static const char**fgVolPath[kLastLayer - kFirstLayer]; + static TString* fgVolPath[kLastLayer - kFirstLayer]; + + static AliAlignObj** fgAlignObjs[kLastLayer - kFirstLayer]; ClassDef(AliAlignObj, 2) };