59,7 → 59,6 |
else if(analTab->GetCurrent() == 1) // Relative PDE |
{ |
relPde->widgetChBox[0]->SetState(kButtonDown); |
relPde->widgetChBox[1]->SetState(kButtonUp); |
midPeak->widgetChBox[0]->SetState(kButtonUp); |
zeroAngle->widgetNE[0]->SetNumber(0.00); |
} |
695,7 → 694,7 |
gVirtualX->Update(1); |
|
// Check if the checkbox for no peaks is selected - TODO: Still need the situation when we do not have a peaked ADC spectrum |
if(relPde->widgetChBox[1]->IsDown()) |
/* if(relPde->widgetChBox[1]->IsDown()) |
{ |
printf("PhotonMu(): ADC spectrum has no peak structure.\n"); |
nopeaks = 1; |
712,7 → 711,7 |
return; |
} |
|
} |
}*/ |
|
// Start if we select at least one file |
if(nrfiles > 0) |
1196,6 → 1195,7 |
// Get next point values (if zero value -> need to add the dark hist value again) |
pointest[10] = angle[i]; |
pointest[11] = muval[i]; |
// printf("Last point = [%lf,%lf]\n", pointest[10], pointest[11]); |
|
// Check if next point has larger error than acceptable (if yes, set exclude signal to true), reuse meansel[0] |
meansel[0] = PointEstimate(5, pointest); // PointEstimate only works with very small step size |
1205,6 → 1205,12 |
exclude = true; |
} |
|
if(isinf(meansel[0])) |
{ |
printf("PhotonMu(): Point (%lf, %lf) excluded due to being infinite: %lf\n", pointest[10], pointest[11], meansel[0]); |
exclude = true; |
} |
|
// Value with 0 angle and dark histogram are always needed, so should not be excluded |
if(i == darkhist) |
exclude = false; |
1231,6 → 1237,8 |
pointest[2*m+1] = muval[i]; |
} |
|
printf("Exclude signal = %d\n", (int)exclude); |
|
// Run only if we have a dark run histogram and middle pedestal peak estimation |
if( (darkhist != -1) && midPeak->widgetChBox[0]->IsDown() ) |
{ |