Skip to content

Commit bf0fbd4

Browse files
committed
Update makers to pull DEP from TriggerData and store in StEpdHit
1 parent d464e1b commit bf0fbd4

File tree

3 files changed

+48
-2
lines changed

3 files changed

+48
-2
lines changed

StRoot/StEpdHitMaker/StEpdHitMaker.cxx

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
If it is not there, it creates one and fills it from the
1313
StTriggerData object and info from the StEpdDbMaker (database)
1414
15+
16+
Update March 2023 - Mike Lisa
17+
Updated to pull DEP information from the TriggerData and store in the newly-updated StEpdHit object
18+
1519
*/
1620

1721
#include "StEpdHitMaker.h"
@@ -198,6 +202,10 @@ void StEpdHitMaker::FillStEpdData(){
198202

199203
int truthId=0; // this is for simulation
200204

205+
// March 2023 - now add DEP information
206+
unsigned short rawDEP;
207+
float calibratedDEP;
208+
getEpdDepInfo(ew, PP, TT, rawDEP, calibratedDEP);
201209

202210
// EpdOfs2 << ew << "\t" << PP << "\t" << TT << "\t"
203211
// << mEpdDbMaker->GetCrateAdc(ew,PP,TT) << "\t"
@@ -208,9 +216,19 @@ void StEpdHitMaker::FillStEpdData(){
208216
// << mEpdDbMaker->GetChannelTac(ew,PP,TT) << "\t"
209217
// << ADC << "\t" << nMIP << endl;
210218

211-
StEpdHit* hit = new StEpdHit(PP,TT,EWforHit,ADC,TAC,TDC,HasTac,nMIP,isGood,truthId);
219+
StEpdHit* hit = new StEpdHit(PP, TT, EWforHit, ADC, TAC, TDC, HasTac, nMIP, isGood, truthId, rawDEP, calibratedDEP);
212220
mEpdCollection->addHit(hit);
213221
nHitsAdded++;
222+
} // if ADC>0
223+
else { // even if there is no ADC from the QT, there might still be info from the DEP - March 2023
224+
unsigned short rawDEP;
225+
float calibratedDEP;
226+
getEpdDepInfo(ew, PP, TT, rawDEP, calibratedDEP);
227+
if (rawDEP > 0) {
228+
StEpdHit* hit = new StEpdHit((int)PP, (int)TT, EWforHit, 0, 0, 0, false, 0, true, 0, rawDEP, calibratedDEP);
229+
mEpdCollection->addHit(hit);
230+
nHitsAdded++;
231+
}
214232
}
215233
}
216234
}
@@ -223,3 +241,23 @@ void StEpdHitMaker::FillStEpdData(){
223241
LOG_INFO << "StEpdHitMaker::FillStEpdData - added " << nHitsAdded << " to StEpdHitCollection" << endm;
224242
}
225243

244+
245+
// March 2023 - get DEP data
246+
void StEpdHitMaker::getEpdDepInfo(short ew, short pp, short tt, unsigned short& rawDEP, float& calibratedDEP){
247+
if (ew == 0) { rawDEP = 0; calibratedDEP = 0.; return;} // only DEP on the west side
248+
249+
// -------------------------- March 2023 ---------------------------------
250+
// Here is where I must fill in the code to
251+
// 1) Get the raw DEP waveform from the TriggerData
252+
// 2) Sum up the appropriate time buckets (this is DEPdata)
253+
// 3) Get the gain constant from the database (which needs to exist!!!)
254+
// 4) mnMIP_DEP = DEPdata / gain
255+
// 5) put mnMIP_DEP and rawDEPdata into the StEpdHit
256+
//
257+
// 6) might want to impose a "zero suppression threshold" here, too
258+
259+
// right now I just return zero
260+
rawDEP = 0;
261+
calibratedDEP = 0.0;
262+
return;
263+
}

StRoot/StEpdHitMaker/StEpdHitMaker.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
If it is not there, it creates one and fills it from the
1414
StTriggerData object and info from the StEpdDbMaker (database)
1515
16+
17+
Update March 2023 - Mike Lisa
18+
now must read in DEP data and store it in the newly-updated StEpdHit objects
19+
1620
*/
1721

1822

@@ -51,6 +55,10 @@ class StEpdHitMaker : public StMaker {
5155
/// Returns a pointer to the StEvent object
5256
StEvent* GetStEvent(){return mStEvent;}
5357

58+
/// update March 2023 Mike Lisa - method to get and calibrate DEP information
59+
/// This does not NEED to be public, but no harm and may be useful for debugging
60+
void getEpdDepInfo(short ew, short pp, short tt, unsigned short& rawDEP, float& calibratedDEP);
61+
5462
virtual const char *GetCVS() const
5563
{static const char cvs[]="Tag " __DATE__ " " __TIME__ ; return cvs;}
5664

StRoot/StPicoDstMaker/StPicoDstMaker.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2361,7 +2361,7 @@ void StPicoDstMaker::fillEpdHits() {
23612361
StMuEpdHit* aHit = mMuDst->epdHit(i);
23622362
if (!aHit) continue;
23632363
int counter = mPicoArrays[StPicoArrays::EpdHit]->GetEntries();
2364-
new((*(mPicoArrays[StPicoArrays::EpdHit]))[counter]) StPicoEpdHit(aHit->id(), aHit->qtData(), aHit->nMIP());
2364+
new((*(mPicoArrays[StPicoArrays::EpdHit]))[counter]) StPicoEpdHit(aHit->id(), aHit->qtData(), aHit->nMIP_QT(), aHit->depData(), aHit->nMIP_DEP()); // added DEP info - March 2023 - mike lisa
23652365
} //for (unsigned int i=0; i < mMuDst->numberOfEpdHit(); i++)
23662366
}
23672367

0 commit comments

Comments
 (0)