Skip to content
Snippets Groups Projects
Commit f64afe8c authored by hallc-online's avatar hallc-online
Browse files

Fix problem in THcAerogel::CoarseProcess with fNpeSum

The line fNpeSum += fNegNpeSum
was basically double counting the fNegNpeSum
Same for fNpeSum += fPosNpeSum
since they were in a loop over Neg and Pos hits.

Just set
fNpeSum = fNegNpeSum + fPosNpeSum
after the two loops over Neg and Pos hits
parent 354fd669
No related branches found
No related tags found
No related merge requests found
......@@ -645,9 +645,8 @@ Int_t THcAerogel::CoarseProcess( TClonesArray& ) //tracks
fGoodPosAdcPulseTime.at(npmt) = pulseTime;
fPosNpe.at(npmt) = fPosGain[npmt]*fGoodPosAdcPulseInt.at(npmt);
fPosNpeSum += fPosNpe.at(npmt);
fNpeSum += fPosNpeSum;
fPosNpeSum += fPosNpe.at(npmt);
fTotNumGoodAdcHits++;
fTotNumGoodPosAdcHits++;
fNumGoodPosAdcHits.at(npmt) = npmt + 1;
......@@ -675,15 +674,16 @@ Int_t THcAerogel::CoarseProcess( TClonesArray& ) //tracks
fGoodNegAdcPulseTime.at(npmt) = pulseTime;
fNegNpe.at(npmt) = fNegGain[npmt]*fGoodNegAdcPulseInt.at(npmt);
fNegNpeSum += fNegNpe.at(npmt);
fNpeSum += fNegNpeSum;
fNegNpeSum += fNegNpe.at(npmt);
fTotNumGoodAdcHits++;
fTotNumGoodNegAdcHits++;
fNumGoodNegAdcHits.at(npmt) = npmt + 1;
}
}
fNpeSum = fNegNpeSum + fPosNpeSum;
for(Int_t ihit=0; ihit < fNhits; ihit++) {
Int_t nPosTDCHits = 0;
......
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