Skip to content

Commit

Permalink
do not rename data member in IO class
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
plexoos committed Mar 17, 2023
1 parent f76f41d commit 8f88112
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
5 changes: 2 additions & 3 deletions StRoot/StEvent/StEpdHit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,14 @@ StEpdHit::StEpdHit() : StEpdHit(0, 0, 0, 0, 0, 0, false, 0.0, false, 0, 0, 0.0)

// March 2023:
// * add arguments for DEPdata and nMIP_DEP
// * rename nMIP to nMIP_QT
StEpdHit::StEpdHit(int position, int tile,
short EW, int ADC, int TAC,
int TDC, bool hasTAC, float nMIP_QT,
int TDC, bool hasTAC, float nMIP,
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_QT(nMIP_QT),
mnMIP(nMIP),
mTruthId(truthId),
mDEPdata(DEPdata),
mnMIP_DEP(nMIP_DEP)
Expand Down
16 changes: 7 additions & 9 deletions StRoot/StEvent/StEpdHit.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class StEpdHit : public StObject
/// \param TAC TAC reported by QT board (if there is one) [0,4095]
/// \param TDC TDC reported by QT board [0,32]
/// \param hasTAC true/fals if this channel has a TAC
/// \param nMIP_QT gain-calibrated signal from QT; energy loss in terms of MPV of Landau for a MIP - renamed from nMIP March 2023
/// \param nMIP gain-calibrated signal from QT; energy loss in terms of MPV of Landau for a MIP
/// \param statusIsGood good status, according to database
/// \param truthId particle id of particle most responsible for energy loss (simulation)
/// \param DEPdata raw DEP data, in summed ADCs - added May 2023
Expand Down Expand Up @@ -118,10 +118,8 @@ class StEpdHit : public StObject
void setQTdata(int packedData);

/// \param gain calibrated energy loss in tile, in units of Landau MPV for one MIP - based on QT data
/// I have RENAMED this method from "setnMIP" to "setnMIP_QT". I know such actions are to be minimized,
/// but I do not believe this will cause any
/// problems for the outside user. And it is simply safer. - March 2023
void setnMIP_QT(float nMIP_QT);
void setnMIP(float nMIP);

/// set identifier of particle most responsible for energy loss (simulation)
void setIdTruth(int id);
Expand Down Expand Up @@ -162,8 +160,7 @@ class StEpdHit : public StObject

/// gain calibrated energy loss in tile, in units of Landau MPV for one MIP
/// important: prior to 2023, the ONLY information came from the QTs. Now we also have the DEP
/// So, this variable has been RENAMED from mnMIP to mnMIP_QT. I believe it the safest way - March 2023
Float_t mnMIP_QT;
Float_t mnMIP;

/// identifier of particle most responsible for energy loss (simulation)
Int_t mTruthId;
Expand All @@ -178,8 +175,9 @@ class StEpdHit : public StObject
};

inline int StEpdHit::qtData() const {return mQTdata;}
inline float StEpdHit::nMIP() const {return (this->qtDataAvailable())?mnMIP_QT:mnMIP_DEP;} // March 2023
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;}
Expand All @@ -196,6 +194,6 @@ 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_QT;}
inline void StEpdHit::setnMIP_QT(float nMIP_QT){mnMIP_QT=nMIP_QT;}
inline float StEpdHit::nMIP_QT() const {return mnMIP;}
inline void StEpdHit::setnMIP_QT(float nMIP_QT){mnMIP=nMIP_QT;}
#endif

0 comments on commit 8f88112

Please sign in to comment.