2727 * the StEpdHit object in StEvent
2828 *
2929 * - Mike Lisa Jan 2018
30+ *
31+ *
32+ * Update March 2023 (More than 5 years later. Not bad.) Mike Lisa
33+ * - We now have the DAQ upgrade and DEP readout on the West side.
34+ * DEP information will *always* be there. QT only at low rate.
35+ * So, now have to store DEP information.
36+ *
37+ * It means several new methods, and two new data members:
38+ * 1) unsigned short DEPdata
39+ * 2) float nMIP_DEP
40+ * So, now the size of one StMuEpdHit is 16 bytes
3041 ************************************************/
3142class StEpdHit ;
3243
@@ -44,10 +55,12 @@ class StMuEpdHit : public StObject
4455 // / \param TAC TAC reported by QT board (if there is one) [0,4095]
4556 // / \param TDC TDC reported by QT board [0,32]
4657 // / \param hasTAC true/fals if this channel has a TAC
47- // / \param nMIP gain-calibrated signal; energy loss in terms of MPV of Landau for a MIP
58+ // / \param nMIP_QT gain-calibrated signal; energy loss in terms of MPV of Landau for a MIP - based on QT data
4859 // / \param statusIsGood good status, according to database
4960 // / \param truthId id of particle most responsible for energy loss (simulation)
50- StMuEpdHit (Int_t position, Int_t tile, Short_t EW, Int_t ADC, Int_t TAC, Int_t TDC, bool hasTAC, Float_t nMIP, bool statusIsGood, Int_t truthId);
61+ // / \param DEPdata raw data from DEP - March 2023
62+ // / \param nMIP_DEP gain-calibrated signal; energy loss in terms of MPV of Landau for a MIP - based on DEP data - March 2023
63+ StMuEpdHit (Int_t position, Int_t tile, Short_t EW, Int_t ADC, Int_t TAC, Int_t TDC, bool hasTAC, Float_t nMIP_QT, bool statusIsGood, Int_t truthId, UShort_t DEPdata, Float_t nMIP_DEP);
5164
5265 // / constructor based on StEpdHit
5366 // / this is what will be used in constructing the StMuDst from the StEvent
@@ -77,8 +90,6 @@ class StMuEpdHit : public StObject
7790 // / bit 29=0/1 for has/does not have TAC;
7891 // / bit 30=0/1 if tile is marked bad/good in database
7992 Int_t qtData () {return mQTdata ;}
80- // / gain calibrated energy loss in tile, in units of Landau MPV for one MIP
81- Float_t nMIP () {return mnMIP;}
8293 // / false if tile is bad or missing, according to (time-dependent) database
8394 bool isGood () const ;
8495
@@ -92,15 +103,30 @@ class StMuEpdHit : public StObject
92103 // / It is expected that this will not be invoked, but rather the constructor used
93104 // / \param id = sign*(100*position+tile) where sign=+/- for West/East wheel
94105 void setId (Short_t id){mId = id;}
95- // / \param gain calibrated energy loss in tile, in units of Landau MPV for one MIP
96- void SetnMIP (Float_t nMIP){mnMIP = nMIP;}
97-
106+ // / \param gain calibrated energy loss in tile, in units of Landau MPV for one MIP - based on QT data - March 2023
107+ void setnMIP_QT (Float_t nMIP_QT){mnMIP_QT = nMIP_QT;}
98108 // / set the id of particle most responsible for energy loss in tile (monte carlo)
99109 void setIdTruth (Int_t id){mTruthId = id;}
100-
101110 // / returns the particle number for the particle most responsible for energy loss (monte carlo)
102111 Int_t idTruth (){return mTruthId ;}
103112
113+ // Now a bunch of methods for DEP - March 2023
114+ // / store the raw DEP data
115+ void setDEPdata (unsigned short DEPdata){mDEPdata =DEPdata;}
116+ // / store the gain-calibrated energy loss based on DEP data
117+ void setnMIP_DEP (float nMipDep){mnMIP_DEP=nMipDep;}
118+ // / get the raw DEP data
119+ UShort_t depData () const {return mDEPdata ;}
120+ // / get the gain-calibrated energy loss based on DEP data
121+ Float_t nMIP_DEP () const {return mnMIP_DEP;}
122+ // / true if there is QT information available for this (will be false for sure at high rates on west side)
123+ bool qtDataAvailable () const ;
124+ // / gain calibrated energy loss in tile, in units of Landau MPV for one MIP - based on QT data
125+ Float_t nMIP_QT () const {return mnMIP_QT;}
126+ // / gain calibrated energy loss in tile, in units of Landau MPV for one MIP - based on QT data if there is QT data. Otherwise from DEP
127+ Float_t nMIP () const {return (this ->qtDataAvailable ())?mnMIP_QT:mnMIP_DEP;}
128+
129+
104130protected:
105131
106132 // / Packed channel Id:
@@ -113,13 +139,19 @@ class StMuEpdHit : public StObject
113139 // / bit 30 is the good/bad (1/0) status flag
114140 Int_t mQTdata ;
115141
116- // / gain calibrated energy loss in tile, in units of Landau MPV for one MIP
117- Float_t mnMIP;
142+ // / gain calibrated energy loss in tile, in units of Landau MPV for one MIP - based on QT
143+ Float_t mnMIP_QT;
144+
145+ // / raw DEP data - March 2023
146+ UShort_t mDEPdata ;
147+
148+ // / gain-calibrated energy loss in tile, in units of Landau MPV for one MIP - based on DEP - March 2023
149+ Float_t mnMIP_DEP;
118150
119151 // / greatest contributer to energy deposition (MC)
120152 Int_t mTruthId ;
121153
122- ClassDef (StMuEpdHit, 1 )
154+ ClassDef (StMuEpdHit, 2 )
123155};
124156
125157inline Short_t StMuEpdHit::side () const { return mId < 0 ? -1 : +1 ;}
@@ -133,4 +165,6 @@ inline Int_t StMuEpdHit::tac() const { return (mQTdata >> 12) & 0x0FFF; }
133165inline Int_t StMuEpdHit::tdc () const { return (mQTdata >> 24 ) & 0x001F ; }
134166inline bool StMuEpdHit::hasTac () const { return (mQTdata >> 29 ) & 0x1 ; }
135167inline bool StMuEpdHit::isGood () const { return (mQTdata >> 30 ) & 0x1 ; }
168+ inline bool StMuEpdHit::qtDataAvailable () const {return (this ->adc ()!=0 );}
169+
136170#endif
0 commit comments