diff --git a/src/THcHodoscope.cxx b/src/THcHodoscope.cxx index a3a28ef1801365b7d83ab5bbf44f2981c5a14a0f..9e6b0bcb8c5a988872ae2ead15a322f0304dc15f 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 d51f3d8b0ebd96733985ab9ad1345273359ac135..1d57a97b4b7d0744220ac92036314304a4a67ee5 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,