diff --git a/StRoot/StEvent/StEpdHit.cxx b/StRoot/StEvent/StEpdHit.cxx index fa52e79d450..a7cd687e966 100644 --- a/StRoot/StEvent/StEpdHit.cxx +++ b/StRoot/StEvent/StEpdHit.cxx @@ -33,12 +33,12 @@ StEpdHit::StEpdHit() : StEpdHit(0, 0, 0, 0, 0, 0, false, 0.0, false, 0, 0, 0.0) // * add arguments for DEPdata and nMIP_DEP StEpdHit::StEpdHit(int position, int tile, short EW, int ADC, int TAC, - int TDC, bool hasTAC, float nMIP, + int TDC, bool hasTAC, float nMIP_QT, bool statusIsGood, int truthId, unsigned short DEPdata, float nMIP_DEP) : mId( (100*position + tile)*EW ), mQTdata( (ADC & 0x0FFF) | (TAC & 0x0FFF) << 12 | (TDC & 0x001F) << 24 | hasTAC << 29 | statusIsGood << 30 ), - mnMIP(nMIP), + mnMIP(nMIP_QT), mTruthId(truthId), mDEPdata(DEPdata), mnMIP_DEP(nMIP_DEP) diff --git a/StRoot/StEvent/StEpdHit.h b/StRoot/StEvent/StEpdHit.h index 10a811ea237..7e1677125e5 100644 --- a/StRoot/StEvent/StEpdHit.h +++ b/StRoot/StEvent/StEpdHit.h @@ -174,13 +174,13 @@ class StEpdHit : public StObject ClassDef(StEpdHit, 2) }; -inline int StEpdHit::qtData() const {return mQTdata;} -inline float StEpdHit::nMIP() const {return (this->qtDataAvailable())?mnMIP:mnMIP_DEP;} // March 2023 -inline void StEpdHit::setQTdata(int packedData) {mQTdata=packedData;} -inline void StEpdHit::setnMIP(float nMIP) {mnMIP = nMIP;} -inline void StEpdHit::setIdTruth(int id) {mTruthId = id;} -inline int StEpdHit::idTruth() const {return mTruthId;} -inline short StEpdHit::side() const { return mId < 0 ? -1 : +1;} +inline int StEpdHit::qtData() const {return mQTdata; } +inline float StEpdHit::nMIP() const { return qtDataAvailable() ? mnMIP : mnMIP_DEP; } +inline void StEpdHit::setQTdata(int packedData) { mQTdata = packedData; } +inline void StEpdHit::setnMIP(float nMIP) { mnMIP = nMIP; } +inline void StEpdHit::setIdTruth(int id) { mTruthId = id; } +inline int StEpdHit::idTruth() const { return mTruthId; } +inline short StEpdHit::side() const { return mId < 0 ? -1 : +1; } inline short StEpdHit::id() const { return mId; } inline int StEpdHit::position() const { return std::abs(mId / 100); } inline int StEpdHit::tile() const { return std::abs(mId % 100); } @@ -189,11 +189,11 @@ inline int StEpdHit::tac() const { return (mQTdata >> 12) & 0x0FFF; } inline int StEpdHit::tdc() const { return (mQTdata >> 24) & 0x001F; } inline bool StEpdHit::hasTac() const { return (mQTdata >> 29) & 0x1; } inline bool StEpdHit::isGood() const { return (mQTdata >> 30) & 0x1; } -inline void StEpdHit::setDEPdata(unsigned short DEPdata) {mDEPdata=DEPdata;} -inline void StEpdHit::setnMIP_DEP(float nMIP_DEP) {mnMIP_DEP=nMIP_DEP;} -inline int StEpdHit::depData() const {return mDEPdata;} -inline float StEpdHit::nMIP_DEP() const {return mnMIP_DEP;} -inline bool StEpdHit::qtDataAvailable() const {return (this->adc()!=0);} -inline float StEpdHit::nMIP_QT() const {return mnMIP;} -inline void StEpdHit::setnMIP_QT(float nMIP_QT){mnMIP=nMIP_QT;} +inline void StEpdHit::setDEPdata(unsigned short DEPdata) { mDEPdata = DEPdata; } +inline void StEpdHit::setnMIP_DEP(float nMIP_DEP) { mnMIP_DEP = nMIP_DEP; } +inline int StEpdHit::depData() const { return mDEPdata; } +inline float StEpdHit::nMIP_DEP() const { return mnMIP_DEP; } +inline bool StEpdHit::qtDataAvailable() const { return adc() != 0; } +inline float StEpdHit::nMIP_QT() const { return mnMIP; } +inline void StEpdHit::setnMIP_QT(float nMIP_QT){ mnMIP = nMIP_QT; } #endif