#ifndef STNTUPLE_TSiAlign #define STNTUPLE_TSiAlign // // Simple container of TVector3's which represents the center and // normal vector of each silicon ladder segment (SiDigiCode) and // each wafer in the half ladder. // // The input files come from running TrackingUserMods/test/siGeometryValidation.cc // with the option "outputFile" to save an ascii file of the // geometry after alignment. // // You can create this object either from an ascii file, // or you can stream it in or out. // // Aaron Dominguez 8 Nov 2002 // // Updated 24 Apr 2003 to read perp axial and perp stereo directions // #include "TObject.h" #include "TVector3.h" #include "TMap.h" #include "Stntuple/obj/TStnSiDigiCode.hh" #include class TSiAlign : public TObject { public: TSiAlign(const std::string &geoFile); // Create from ascii file TSiAlign(); // Create from streamer ~TSiAlign(); // Access to center and normal of each ladder seg as well perp // directions to strips on both sides TVector3* GetCenter(TStnSiDigiCode *digi); TVector3* GetNormal(TStnSiDigiCode *digi); TVector3* GetPerpAx(TStnSiDigiCode *digi); TVector3* GetPerpSt(TStnSiDigiCode *digi); int GetNWafer(TStnSiDigiCode *digi); int GetWafer(TStnSiDigiCode *digi, double locz); // Returns the wafer number for local z TVector3* GetWaferCenter(TStnSiDigiCode *digi, int iw); TVector3* GetWaferNormal(TStnSiDigiCode *digi, int iw); TVector3* GetWaferPerpAx(TStnSiDigiCode *digi, int iw); TVector3* GetWaferPerpSt(TStnSiDigiCode *digi, int iw); class TSiHalfLadder : public TObject { public: TSiHalfLadder():h(),nh(),n(0){;} ~TSiHalfLadder(){;} TVector3 h; // Global of center of each half ladder TVector3 nh; // Normal vector of center of half ladder TVector3 pah; // Perp vector to dir of axial strips of half ladder TVector3 psh; // Perp vector to dir of stereo strips of half ladder int n; // number of wafers in half ladder double zlow; // Lower z-boundary of 2nd wafer in half-lad local coords double zhi; // Upper z-boundary of 2nd wafer; in case of n=2, this is inf. TVector3 w[3]; // Global of center of each wafer TVector3 nw[3]; // Normal vector of ctr of wafer TVector3 paw[3]; // Perp vector to dir of axial strips of wafer TVector3 psw[3]; // Perp vector to dir of stereo strips of wafer ClassDef(TSiHalfLadder,2) }; private: // Map of wafer alignments TMap fMap; // TMap of TSiHalfLadders keyed by TStnSiDigiCodes ClassDef(TSiAlign,2) }; #endif