From da5ae0a2c69cbd023a278abccc17b17f0747b5d8 Mon Sep 17 00:00:00 2001 From: "Stephen A. Wood" <saw@jlab.org> Date: Mon, 13 Apr 2015 16:12:31 -0400 Subject: [PATCH] Remove unneeded arrays from EstimateFocalPlaneTime and fix typos --- src/THcHodoscope.cxx | 8 ++++---- src/THcScintillatorPlane.cxx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/THcHodoscope.cxx b/src/THcHodoscope.cxx index a3a28ef..9e6b0bc 100644 --- a/src/THcHodoscope.cxx +++ b/src/THcHodoscope.cxx @@ -591,8 +591,6 @@ Int_t THcHodoscope::Decode( const THaEvData& evdata ) void THcHodoscope::EstimateFocalPlaneTime( void ) { Int_t timehist[200]; - Int_t time_pos[100],time_neg[100]; - Double_t scin_corrected_time[100]; for (Int_t i=0;i<200;i++) { timehist[i] = 0; @@ -638,8 +636,10 @@ void THcHodoscope::EstimateFocalPlaneTime( void ) TClonesArray* hodoHits = fPlanes[ip]->GetHits(); for(Int_t i=0;i<nphits;i++) { Double_t tmin = 0.5*binmax; - if ((time_pos[ihit]>tmin) && (time_pos[ihit]<tmin+fTofTolerance) && - (time_neg[ihit]>tmin) && (time_neg[ihit]<tmin+fTofTolerance)) { + Double_t postime=((THcHodoHit*) hodoHits->At(i))->GetPosTOFCorrectedTime(); + Double_t negtime=((THcHodoHit*) hodoHits->At(i))->GetNegTOFCorrectedTime(); + if ((postime>tmin) && (postime<tmin+fTofTolerance) && + (negtime>tmin) && (negtime<tmin+fTofTolerance)) { // Both tubes fired Int_t index=((THcHodoHit*)hodoHits->At(i))->GetPaddleNumber()-1; Double_t fptime = ((THcHodoHit*)hodoHits->At(i))->GetScinCorrectedTime() diff --git a/src/THcScintillatorPlane.cxx b/src/THcScintillatorPlane.cxx index d51f3d8..1d57a97 100644 --- a/src/THcScintillatorPlane.cxx +++ b/src/THcScintillatorPlane.cxx @@ -351,7 +351,7 @@ Int_t THcScintillatorPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit) Double_t negtime=timec_neg-(hit_position-fPosRight)/fHodoVelLight[index]; Double_t scin_corrected_time = 0.5*(postime+negtime); postime = postime-(fZpos+(index%2)*fDzpos)/(29.979*fBetaNominal); - negtime = postime-(fZpos+(index%2)*fDzpos)/(29.979*fBetaNominal); + negtime = negtime-(fZpos+(index%2)*fDzpos)/(29.979*fBetaNominal); ((THcHodoHit*) fHodoHits->At(fNScinHits))->SetCorrectedTimes(timec_pos,timec_neg, postime, negtime, -- GitLab