#ifndef HFORWARDCAND_H #define HFORWARDCAND_H #include "forwarddef.h" #include "haddef.h" #include "stsdef.h" #include "hvirtualcand.h" #include #include #include #include #include #include class HForwardCand : public HVirtualCand { public: HForwardCand(); // status flags void setFlagBit(HForward::eForwardFlagBits bit) { fFlags |= (0x01 << bit); } void unsetFlagBit(HForward::eForwardFlagBits bit) { fFlags &= ~(0x01 << bit); } Bool_t isFlagBit(HForward::eForwardFlagBits bit) const { return (fFlags >> bit) & 0x01; } void setFlagBit(UInt_t bit); void unsetFlagBit(UInt_t bit); Bool_t isFlagBit(UInt_t bit) const; void setFlagBitByValue(HForward::eForwardFlagBits bit, Bool_t val) { val ? setFlagBit(bit) : unsetFlagBit(bit); } void setFlagBitByValue(Int_t bit, Bool_t val) { val ? setFlagBit(bit) : unsetFlagBit(bit); } Int_t getFlagField() const { return fFlags; } void setFlagField(Int_t field) { fFlags = field; } Bool_t isFlagAND(Int_t num, ...) const; Bool_t isFlagOR(Int_t num, ...) const; /** Track properties section **/ // Distance of the flight path Float_t getDistance() const { return fDistance; } void setDistance(Float_t dist) { fDistance = dist; } // Time of the flight Float_t getTof() const { return fTof; } void setTof(Float_t tof) { fTof = tof; } // Signal TOT Float_t getTot() const { return fTot; } void setTot(Float_t tot) { fTot = tot; } /** Traking info section **/ Int_t getNDF() const { return fNDF; } void setNDF(Int_t ndf) { fNDF = ndf; } // sts hits Int_t getNofHits() const { return fNhits; } Int_t addStsHit(Int_t indx); Int_t getStsHitIndex(Int_t ihit) const { return fStsHitIdx[ihit]; } Float_t getStsDriftRadius(Int_t ihit) const { return fStsDriftRadius[ihit]; } void setStsDriftRadius(Int_t ihit, Float_t tot) { fStsDriftRadius[ihit] = tot; } const Float_t* getStsDriftRadius() const { return fStsDriftRadius; } // FRpc hit Int_t getFRpcHitIndex() const { return fFRpcHitIdx; } void setFRpcHitIndex(Int_t idx) { fFRpcHitIdx = idx; } TMatrixDSym getCovMatrix() const; void setCovMatrix(TMatrixDSym matr); // Calc TLorentzVector for given mass void calc4vectorProperties(Double_t m); void print(UInt_t selection = 31) const; private: Short_t fFlags; // status flags Char_t fNhits; // number of hits Char_t fNDF; // number of degrees of freedom Short_t fStsHitIdx[STS_MAX_VPLANES]; //[fNhits] hit indices in planes Float16_t fStsDriftRadius[STS_MAX_VPLANES]; //[fNhits] reconstructed straw drift times Float16_t fTot; //[fNhits] total Tot Short_t fFRpcHitIdx; // FRpc hit index Float16_t fDistance; // distance of flight Float16_t fTof; // time of flight Float16_t fCovMatrix[10]; // covar. matrix ClassDef(HForwardCand, 1); }; #endif