From f78cff4e11ce7b1c085539756dc5a7b2492de45b Mon Sep 17 00:00:00 2001 From: "Stephen A. Wood" <saw@jlab.org> Date: Tue, 28 Nov 2017 16:10:36 -0500 Subject: [PATCH] Make the FADC time offset in the hodoscope double. This is because it is offsetting PulseTime which is double and to be consistent with the other detectors. --- src/THcHodoscope.cxx | 6 +++--- src/THcHodoscope.h | 4 ++-- src/THcScintillatorPlane.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/THcHodoscope.cxx b/src/THcHodoscope.cxx index e214e82..7945ffe 100644 --- a/src/THcHodoscope.cxx +++ b/src/THcHodoscope.cxx @@ -277,14 +277,14 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date ) fyHiScin = new Int_t [fNHodoscopes]; fHodoSlop = new Double_t [fNPlanes]; fTdcOffset = new Int_t [fNPlanes]; - fAdcTdcOffset = new Int_t [fNPlanes]; + fAdcTdcOffset = new Double_t [fNPlanes]; fAdcTimeWindowMin = new Double_t [fNPlanes]; fAdcTimeWindowMax = new Double_t [fNPlanes]; for(Int_t ip=0;ip<fNPlanes;ip++) { // Set a large default window fTdcOffset[ip] = 0 ; - fAdcTdcOffset[ip] = 0 ; + fAdcTdcOffset[ip] = 0.0 ; } DBRequest list[]={ @@ -312,7 +312,7 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date ) {"hodo_slop", fHodoSlop, kDouble, (UInt_t) fNPlanes}, {"debugprintscinraw", &fdebugprintscinraw, kInt, 0,1}, {"hodo_tdc_offset", fTdcOffset, kInt, (UInt_t) fNPlanes, 1}, - {"hodo_adc_tdc_offset", fAdcTdcOffset, kInt, (UInt_t) fNPlanes, 1}, + {"hodo_adc_tdc_offset", fAdcTdcOffset, kDouble, (UInt_t) fNPlanes, 1}, {"hodo_AdcTimeWindowMin", fAdcTimeWindowMin, kDouble, (UInt_t) fNPlanes}, {"hodo_AdcTimeWindowMax", fAdcTimeWindowMax, kDouble, (UInt_t) fNPlanes}, {"dumptof", &fDumpTOF, kInt, 0, 1}, diff --git a/src/THcHodoscope.h b/src/THcHodoscope.h index f4b5abf..9415544 100644 --- a/src/THcHodoscope.h +++ b/src/THcHodoscope.h @@ -89,7 +89,7 @@ public: Double_t GetPlaneCenter(Int_t ip) { return fPlaneCenter[ip];} Double_t GetPlaneSpacing(Int_t ip) { return fPlaneSpacing[ip];} Int_t GetTdcOffset(Int_t ip) const { return fTdcOffset[ip];} - Int_t GetAdcTdcOffset(Int_t ip) const { return fAdcTdcOffset[ip];} + Double_t GetAdcTdcOffset(Int_t ip) const { return fAdcTdcOffset[ip];} Double_t GetAdcTimeWindowMin(Int_t ip) { return fAdcTimeWindowMin[ip];} Double_t GetAdcTimeWindowMax(Int_t ip) { return fAdcTimeWindowMax[ip];} @@ -199,7 +199,7 @@ protected: Double_t fNCerNPE; Double_t* fHodoSlop; Int_t *fTdcOffset; - Int_t *fAdcTdcOffset; + Double_t *fAdcTdcOffset; Int_t fdebugprintscinraw; Int_t fTestSum; Int_t fTrackEffTestNScinPlanes; diff --git a/src/THcScintillatorPlane.h b/src/THcScintillatorPlane.h index eaecab0..48d72ff 100644 --- a/src/THcScintillatorPlane.h +++ b/src/THcScintillatorPlane.h @@ -179,7 +179,7 @@ class THcScintillatorPlane : public THaSubDetector { Double_t fADCPedScaleFactor; // Multiply dynamic pedestal by this before subtracting Int_t fADCDiagCut; // Cut for ADC in hit maps. Defaults to 50 Int_t fTdcOffset; /* Overall offset to raw tdc */ - Int_t fAdcTdcOffset; /* Overall offset to raw adc times */ + Double_t fAdcTdcOffset; /* Overall offset to raw adc times */ Int_t fMaxHits; /* maximum number of hits to be considered - useful for dimensioning arrays */ Double_t fSpacing; /* paddle spacing */ Double_t fSize; /* paddle size */ -- GitLab