Skip to content

Commit

Permalink
Merge pull request #74 from rest-for-physics/konrad_fixGaussObservables
Browse files Browse the repository at this point in the history
TRestDetectorGitsGaussAnalysisProcess: added exceptions for failed fits
  • Loading branch information
KonradAltenmueller authored Mar 27, 2023
2 parents ba2ab4d + 72b89f3 commit f70049b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/TRestDetectorHitsGaussAnalysisProcess.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,12 @@ TRestEvent* TRestDetectorHitsGaussAnalysisProcess::ProcessEvent(TRestEvent* inpu
Double_t gausSigmaX = fOutputHitsEvent->GetGaussSigmaX();
Double_t gausSigmaY = fOutputHitsEvent->GetGaussSigmaY();
Double_t gausSigmaZ = fOutputHitsEvent->GetGaussSigmaZ();
Double_t xy2SigmaGaus = (gausSigmaX * gausSigmaX) + (gausSigmaY * gausSigmaY);
Double_t xy2SigmaGaus = (gausSigmaX == -1. || gausSigmaY == -1.)
? -1.
: (gausSigmaX * gausSigmaX) + (gausSigmaY * gausSigmaY);
Double_t xySigmaBalanceGaus = (gausSigmaX == -1. || gausSigmaY == -1.)
? -1.
: (gausSigmaX - gausSigmaY) / (gausSigmaX + gausSigmaY);

if (hits->GetNumberOfHits() > 30 && xy2SigmaGaus < 0.05)
RESTDebug << string("Event ID: ") << to_string(fInputHitsEvent->GetID()) << string("||") << RESTendl;
Expand All @@ -173,7 +178,7 @@ TRestEvent* TRestDetectorHitsGaussAnalysisProcess::ProcessEvent(TRestEvent* inpu
SetObservableValue("ySigmaGaus", gausSigmaY);
SetObservableValue("zSigmaGaus", gausSigmaZ);
SetObservableValue("xy2SigmaGaus", xy2SigmaGaus);
SetObservableValue("xySigmaBalanceGaus", (gausSigmaX - gausSigmaY) / (gausSigmaX + gausSigmaY));
SetObservableValue("xySigmaBalanceGaus", xySigmaBalanceGaus);

// We transform here fHitsEvent if necessary

Expand Down

0 comments on commit f70049b

Please sign in to comment.