#ifndef HSTSCAL_H #define HSTSCAL_H #include class HStsCal : public TObject { private: Char_t fModule; // module number (0 and 1 for Straw modules) Char_t fLayer; // layer number (0 - 3) Short_t fStraw; // straw number in the plane Char_t fUpDown; // up-down straw Float16_t fTime; // hit detection time (tof + drift_time - start_offset) Float16_t fTot; // straw energy loss/charge Float16_t fU; // U-coordinate in the lab system Float16_t fZ; // Z-coordinate in the lab system public: HStsCal(); void getAddress(Char_t &m, Char_t &l, Int_t &s, Char_t &ud) const; void setAddress(Char_t m, Char_t l, Int_t s, Char_t ud); void getHit(Float_t &time, Float_t &q, Float_t &u, Float_t &z) const; void setHit(Float_t time, Float_t q, Float_t u, Float_t z); Int_t getModule() const { return fModule; } Int_t getLayer() const { return fLayer; } Int_t getStraw() const { return fStraw; } Int_t getUpDown() const { return fUpDown; } Float_t getTime() const { return fTime; } Float_t getTot() const { return fTot; } Float_t getU() const { return fU; } Float_t getZ() const { return fZ; } Int_t getVPlane() const { return getVPlane(fModule, fLayer, fStraw % 2); } static Int_t getVPlane(Int_t m, Int_t l, Int_t p); /** * The StsCalPar stores each short straw with separate index. Thus proper * index must be found. I plane has N-straws in a vplane, then long and lower * straws are within indexes even indexes, and upper are within odd indexes. */ static Int_t calcStrawIndex(Int_t pstraw, Int_t udconf) { return 2 * pstraw + ((udconf == 0x2) ? 1 : 0); } Int_t calcStrawIndex() const { return calcStrawIndex(fStraw, fUpDown); } Float_t calcRadius(Float_t tof, Float_t p[11]) const; void print() const; ClassDef(HStsCal, 1); }; #endif /* ! HSTSCAL_H */