diff --git a/src/THcShowerPlane.cxx b/src/THcShowerPlane.cxx index be062a012139ddaa08d09aafa63d01018ac4bfb5..5830b40fecf8d742fead821c42a7a69d054c8982 100644 --- a/src/THcShowerPlane.cxx +++ b/src/THcShowerPlane.cxx @@ -345,9 +345,6 @@ Int_t THcShowerPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit) fA_Pos[hit->fCounter-1] = hit->fADC_pos; fA_Neg[hit->fCounter-1] = hit->fADC_neg; - fA_Pos_p[hit->fCounter-1] = hit->fADC_pos - fPosPed[hit->fCounter -1]; - fA_Neg_p[hit->fCounter-1] = hit->fADC_neg - fNegPed[hit->fCounter -1]; - // Sparsify positive side hits, fill the hit list, compute the // energy depostion from positive side for the counter. @@ -358,6 +355,8 @@ Int_t THcShowerPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit) (THcSignalHit*) fPosADCHits->ConstructedAt(nPosADCHits++); sighit->Set(hit->fCounter, hit->fADC_pos); + fA_Pos_p[hit->fCounter-1] = hit->fADC_pos - fPosPed[hit->fCounter -1]; + fEpos[hit->fCounter-1] += fA_Pos_p[hit->fCounter-1]* fParent->GetGain(hit->fCounter-1,fLayerNum-1,0); } @@ -372,6 +371,8 @@ Int_t THcShowerPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit) (THcSignalHit*) fNegADCHits->ConstructedAt(nNegADCHits++); sighit->Set(hit->fCounter, hit->fADC_neg); + fA_Neg_p[hit->fCounter-1] = hit->fADC_neg - fNegPed[hit->fCounter -1]; + fEneg[hit->fCounter-1] += fA_Neg_p[hit->fCounter-1]* fParent->GetGain(hit->fCounter-1,fLayerNum-1,1); }