Skip to content

Conversation

@ckierans
Copy link
Collaborator

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:

  • m_EnergyCalibrationError
  • m_StripPairingError
  • m_DepthCalibrationError
  • m_EventReconstructionError
    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).

@ckierans ckierans requested a review from zoglauer January 21, 2026 01:31
@ckierans ckierans linked an issue Jan 21, 2026 that may be closed by this pull request
//! 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; }
Copy link
Collaborator

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; }
Copy link
Collaborator

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?

Copy link
Collaborator

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; }
Copy link
Collaborator

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; }
Copy link
Collaborator

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();
Copy link
Collaborator

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) {
Copy link
Collaborator

@zoglauer zoglauer Jan 21, 2026

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");
Copy link
Collaborator

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");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has no strip hits?

@zoglauer
Copy link
Collaborator

Think also about to remove the old greedy strip paring approach and the old depth calibration modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check all BD flags!

2 participants