//-*- Mode: C++ -*- // ***************************************************************************** // * // @Autors: I.Kulakov; M.Zyzak; I.Kisel * // @e-mail: I.Kulakov@gsi.de; M.Zyzak@gsi.de; I.Kisel@compeng.uni-frankfurt.de * // * // ***************************************************************************** #ifndef ITSCATRIPLETS_H #define ITSCATRIPLETS_H #include "ITSCADoublets.h" #include using std::vector; class ITSCATriplet { public: ITSCATriplet():fParam(), fLevel(-1){} ITSCATriplet( const ITSCADoublet& s1, const ITSCADoublet& s2, const AliHLTTPCCATrackParam& param ):fParam(param), fLevel(0) { fIHit[0] = s1.IHit(0); fIHit[1] = s1.IHit(1); fIHit[2] = s2.IHit(1); } ITSCATriplet( const TES& ih0, const TES& ih1, const TES& ih2, const AliHLTTPCCATrackParam& param ):fParam(param), fLevel(0) { fIHit[0] = ih0; fIHit[1] = ih1; fIHit[2] = ih2; } // accessors const TES& IHit( int IH ) const { return fIHit[IH]; } int ISta( int IH ) const { return fIHit[IH].s; } const AliHLTTPCCATrackParam& Param() const { return fParam; } float QMomentum() const { return fParam.QMomentum(); } float QMomentumErr() const { return sqrt( fParam.Err2QMomentum() ); } // qp err char& Level() { return fLevel; }; const char& Level() const { return fLevel; }; vector& INeighbours() { return fINeighbours; }; const vector& INeighbours() const { return fINeighbours; }; // check wether a is neighbour from the right to this bool IsRightNeighbour( float pick, const ITSCATriplet& a ){ if ( IHit(1) != a.IHit(0) || IHit(2) != a.IHit(1) ) return false; if ( fabs(QMomentum() - a.QMomentum()) > pick * (QMomentumErr() + a.QMomentumErr()) ) return false; // neighbours must have same qp return true; } private: TES fIHit[3]; // index of hit on station AliHLTTPCCATrackParam fParam; char fLevel; vector fINeighbours; // index of neighbour triplets on their station }; class ITSCATriplets: public ITSCAStationArray { public: ITSCATriplets( int nSta, const ITSCAHits* hits ):ITSCAStationArray( nSta,hits ){}; }; #endif