Commit ab2b94dc authored by Chad Lantz's avatar Chad Lantz
Browse files

Changed nPhotons histogramming to a sum over all hits on all channels for an event

parent 1561c7e7
......@@ -154,6 +154,7 @@ void RPDAnalysis2021::AnalyzeEvent( ){
ChargeSum = 0;
PeakSum = 0;
DiffPeakSum = 0;
float nPhotons = 0.0;
//This loop takes the running average of charge and peak height per tile
for(int row = 0; row < 4; row++){
......@@ -164,7 +165,9 @@ void RPDAnalysis2021::AnalyzeEvent( ){
PeakSum += rpd[row][col]->Peak_max[hit];
DiffPeakSum += rpd[row][col]->Diff_max[hit];
if(rpd[row][col]->gain > 1) hPhotons->Fill(rpd[row][col]->nPhotons[hit]);
if(rpd[row][col]->gain != 0.0){
nPhotons += rpd[row][col]->nPhotons[hit];
}
hChargeArr[row][col]->Fill(rpd[row][col]->Charge[hit]);
hPeakArr[row][col]->Fill(rpd[row][col]->Peak_max[hit]);
hDPeakArr[row][col]->Fill(rpd[row][col]->Diff_max[hit]);
......@@ -172,6 +175,7 @@ void RPDAnalysis2021::AnalyzeEvent( ){
}//end if channel is on
}//end column loop
}//end row loop
hPhotons->Fill(nPhotons);
//This loop finds the center of mass per event (should probably be it's own function)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment