@@ -38,6 +38,10 @@ class Digit : public DigitBase
3838 // / particle in case of MC \return constructed Digit
3939 Digit (short cell, float amplitude, float time, int label);
4040
41+ // / \brief Contructor for TRU Digits
42+ // / \param cell truId of a tile, amplitude energy deposited in a tile, time, triggerType 2x2 or 4x4, dummy label
43+ Digit (short cell, float amplitude, float time, bool isTrigger2x2, int label);
44+
4145 // / \brief Digit constructor from Hit
4246 // / \param PHOS Hit
4347 // / \return constructed Digit
@@ -94,10 +98,16 @@ class Digit : public DigitBase
9498
9599 void addEnergyTime (float energy, float time);
96100
101+ // true if tru and not readount digit
102+ bool isTRU () const { return mAbsId >= NREADOUTCHANNELS; }
103+
97104 // / \brief Absolute sell id
98105 short getAbsId () const { return mAbsId ; }
99106 void setAbsId (short cellId) { mAbsId = cellId; }
100107
108+ short getTRUId () const { return mAbsId - NREADOUTCHANNELS; }
109+ void setTRUId (short cellId) { mAbsId = cellId + NREADOUTCHANNELS; }
110+
101111 // / \brief Energy deposited in a cell
102112 float getAmplitude () const { return mAmplitude ; }
103113 void setAmplitude (float amplitude) { mAmplitude = amplitude; }
@@ -110,6 +120,8 @@ class Digit : public DigitBase
110120 bool isHighGain () const { return mIsHighGain ; }
111121 void setHighGain (Bool_t isHG) { mIsHighGain = isHG; }
112122
123+ bool is2x2Tile () { return isTRU () && isHighGain (); }
124+
113125 // / \brief index of entry in MCLabels array
114126 // / \return ndex of entry in MCLabels array
115127 int getLabel () const { return mLabel ; }
@@ -127,7 +139,7 @@ class Digit : public DigitBase
127139 void PrintStream (std::ostream& stream) const ;
128140
129141 private:
130- // friend class boost::serialization::access;
142+ static constexpr short NREADOUTCHANNELS = 14337 ; // /< Number of channels starting from 1
131143
132144 bool mIsHighGain = true ; // /< High Gain or Low Gain channel (for calibration)
133145 short mAbsId = 0 ; // /< cell index (absolute cell ID)
0 commit comments