-
Notifications
You must be signed in to change notification settings - Fork 12
BD and QA event flag overhaul #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop/em
Are you sure you want to change the base?
Conversation
… these events in revan
…updated variable names
| //! Set the energy-calibration-Error flag | ||
| void SetEnergyCalibrationError(bool Flag = true, MString Text = "") { m_EnergyCalibrationError = Flag; m_EnergyCalibrationErrorString = Text; } | ||
| //! Get the energy-calibration-Error flag | ||
| bool IsEnergyCalibrationError() const { return m_EnergyCalibrationError; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HasEnergyCalibrationError() - same for all below
| //Track BD Flags | ||
|
|
||
| //! Set the energy-calibration-Error flag | ||
| void SetEnergyCalibrationError(bool Flag = true, MString Text = "") { m_EnergyCalibrationError = Flag; m_EnergyCalibrationErrorString = Text; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are overwriting the string if we have multiples. Is that OK? Otherwise the error text should be a vector and we add to it.
Do we ever want to remove the error flag? If no, we don't need the "bool Flag = true". If yes, then it might be better to have a ClearEnergyCalibrationError() function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is the same for everthing below
| int GetStripHitBelowThreshold_Number() const { return m_StripHitBelowThreshold_Number;} | ||
|
|
||
| //! Set the Reduced Chi^2 used in MultiRoundChiSquare module | ||
| void SetReducedChiSquare(double ReducedChiSquare) { m_ReducedChiSquare = ReducedChiSquare; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SetStripPairingReducedChiSquare
|
|
||
| //! Set the Quality of this Event used in Greedy Strip pairing module | ||
| //! TODO Change name of this variable to be more descriptive | ||
| void SetEventQuality(double EventQuality){ m_EventQuality = EventQuality; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still want to keep Clio's approach around?
I don't like to have 2 strip pairing quality factors...
Think about it. I am ready to jettison it...
| if ( Grade < 0 ){ | ||
| H->SetNoDepth(); | ||
| Event->SetDepthCalibrationIncomplete(); | ||
| Event->SetDepthCalibrationError(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add error message
|
|
||
| // Add the depth to the GUI histogram. | ||
| if (Event->IsStripPairingIncomplete()==false) { | ||
| if (Event->IsStripPairingError()==false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
White space: ..() == false
| for (unsigned int side = 0; side <=1; ++side) { // side loop | ||
| if (StripHits[d][side].size() > MaxStripHits) { | ||
| Event->SetStripPairingIncomplete(true, "More than 6 hit strIps on one side"); | ||
| Event->SetStripPairingError(true, "More than 6 hit strIps on one side"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: strIps
|
|
||
| if (StripHits[d][0].size() == 0 || StripHits[d][1].size() == 0) { | ||
| Event->SetStripPairingIncomplete(true, "One detector side has not strip hits"); | ||
| Event->SetStripPairingError(true, "One detector side has not strip hits"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
has no strip hits?
|
Think also about to remove the old greedy strip paring approach and the old depth calibration modules. |
I've done an overhaul on the BD and QA (quality) event flags, and MReadoutAssembly in general. I remove balloon code relics. And updated variable names so they're a bit easier to understand.
We now have 4 BD errors:
where each error flag can come with text that describes the error in more detail, i.e. "No calibration coefficients", or "Out of Range", etc.
We now have QA flags indicating potentially suspect events, i.e. with strip hits removed below threshold, or poor quality strip pairing. These should be used elsewhere in the code whenever an event is altered (TAC cut).