Skip to content
Snippets Groups Projects
Commit e547eda1 authored by Mark Jones's avatar Mark Jones Committed by Mark K Jones
Browse files

Update THcTrigDet::Decode to have fAdcTdcOffset

parent 11731902
No related branches found
No related tags found
No related merge requests found
......@@ -223,7 +223,7 @@ Int_t THcTrigDet::Decode(const THaEvData& evData) {
fAdcPulseIntRaw[cnt] = rawAdcHit.GetPulseIntRaw();
fAdcPulseAmpRaw[cnt] = rawAdcHit.GetPulseAmpRaw();
fAdcPulseTimeRaw[cnt] = rawAdcHit.GetPulseTimeRaw();
fAdcPulseTime[cnt] = rawAdcHit.GetPulseTime();
fAdcPulseTime[cnt] = rawAdcHit.GetPulseTime()+fAdcTdcOffset;
fAdcPed[cnt] = rawAdcHit.GetPed();
fAdcPulseInt[cnt] = rawAdcHit.GetPulseInt();
......@@ -235,7 +235,7 @@ Int_t THcTrigDet::Decode(const THaEvData& evData) {
THcRawTdcHit rawTdcHit = hit->GetRawTdcHit();
fTdcTimeRaw[cnt] = rawTdcHit.GetTimeRaw();
fTdcTime[cnt] = rawTdcHit.GetTime()*fTdcChanperNS-fTdcOffset;
fTdcTime[cnt] = rawTdcHit.GetTime()*fTdcChanperNS+fTdcOffset;
fTdcMultiplicity[cnt] = rawTdcHit.GetNHits();
}
......@@ -269,11 +269,13 @@ Int_t THcTrigDet::ReadDatabase(const TDatime& date) {
{"_adcNames", &adcNames, kString}, // Names of ADC channels.
{"_tdcNames", &tdcNames, kString}, // Names of TDC channels.
{"_tdcoffset", &fTdcOffset, kDouble,0,1}, // Offset of tdc channels
{"_adc_tdc_offset", &fTdcOffset, kDouble,0,1}, // Offset of Adc Pulse time (ns)
{"_tdcchanperns", &fTdcChanperNS, kDouble,0,1}, // Convert channesl to ns
{0}
};
fTdcChanperNS=0.1;
fTdcOffset=300.;
fAdcTdcOffset=200.;
gHcParms->LoadParmValues(list, fKwPrefix.c_str());
// Split the names to std::vector<std::string>.
......
......@@ -36,6 +36,7 @@ class THcTrigDet : public THaDetector, public THcHitList {
Int_t fNumAdc;
Int_t fNumTdc;
Double_t fAdcTdcOffset;
Double_t fTdcOffset;
Double_t fTdcChanperNS;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment