From ec765324b1f9d3b168273717c890776b33c6d6b6 Mon Sep 17 00:00:00 2001 From: Andreas Zoglauer Date: Sun, 26 Apr 2026 22:45:57 -0700 Subject: [PATCH 01/20] CHG: Speed optimizations --- .../MModuleStripPairingMultiRoundChiSquare.h | 13 +-- ...MModuleStripPairingMultiRoundChiSquare.cxx | 105 ++++++++++-------- 2 files changed, 63 insertions(+), 55 deletions(-) diff --git a/include/MModuleStripPairingMultiRoundChiSquare.h b/include/MModuleStripPairingMultiRoundChiSquare.h index 628f967b..ccdb8e72 100644 --- a/include/MModuleStripPairingMultiRoundChiSquare.h +++ b/include/MModuleStripPairingMultiRoundChiSquare.h @@ -81,25 +81,24 @@ class MModuleStripPairingMultiRoundChiSquare : public MModule // protected methods: protected: //! Find a new set of combinations giving the existing gone - vector>> FindNewCombinations(vector>> OldOnes, vector StripHits, bool RoundTwo); + vector>> FindNewCombinations(const vector>>& OldOnes, const vector& StripHits, bool RoundTwo); //! Function to apply charge trapping correction - float ChargeTrappingCorrection(unsigned int d, vector> StripHits); + float ChargeTrappingCorrection(unsigned int d, const vector>& StripHits); //! Divide an event's strip hits by detector and LV/HV side vector>> CollectStripHits(MReadOutAssembly* Event); //! Read in strip hits on each side for each detector and perform quality selections - bool EventSelection(MReadOutAssembly* Event, vector>> StripHits); + bool EventSelection(MReadOutAssembly* Event, const vector>>& StripHits); //! Find all strip combinations for each detector on LV and HV sides given seed combinations - vector>>>> FindAllCombinations(unsigned int d, vector>>>> Combinations, vector>> StripHits, bool RoundTwo); + void FindAllCombinations(unsigned int d, vector>>>>& Combinations, const vector>>& StripHits, bool RoundTwo); //! Evaluate the reduced chi square for all possible strip pairings - tuple>, vector>, double> EvaluateAllCombinations(unsigned int d, vector>>>> Combinations, vector>> StripHits); + tuple>, vector>, double> EvaluateAllCombinations(unsigned int d, const vector>>>>& Combinations, const vector>>& StripHits); //! Create hits - bool CreateHits(unsigned int d, MReadOutAssembly* Event, vector>> StripHits, vector> BestLVSideCombo, vector> BestHVSideCombo); - + bool CreateHits(unsigned int d, MReadOutAssembly* Event, const vector>>& StripHits, const vector>& BestLVSideCombo, const vector>& BestHVSideCombo); //! Return the order of indices resulting from sorting a vector vector Argsort(vector &list); diff --git a/src/MModuleStripPairingMultiRoundChiSquare.cxx b/src/MModuleStripPairingMultiRoundChiSquare.cxx index 61173172..56681015 100644 --- a/src/MModuleStripPairingMultiRoundChiSquare.cxx +++ b/src/MModuleStripPairingMultiRoundChiSquare.cxx @@ -145,23 +145,27 @@ bool MModuleStripPairingMultiRoundChiSquare::Initialize() //////////////////////////////////////////////////////////////////////////////// //! Function returns new combinations of strips based on seed combinations -vector>> MModuleStripPairingMultiRoundChiSquare::FindNewCombinations(vector>> OldOnes, vector StripHits, bool RoundTwo) +vector>> MModuleStripPairingMultiRoundChiSquare::FindNewCombinations(const vector>>& OldOnes, const vector& StripHits, bool RoundTwo) { // Define new vector of ints NewOnes vector>> NewOnes; // of of for (unsigned int listspot = 0; listspot < OldOnes.size(); ++listspot) { // Iterate over set of seed combinations // New single merges - for (unsigned int combi1 = 0; combi1 < OldOnes[listspot].size(); ++combi1) { // Iterate over individual combos within set - for (unsigned int combi2 = combi1 + 1; combi2 < OldOnes[listspot].size(); ++combi2) { // Iterate through all the combos AFTER combi1 - vector NewCombinedStrips; - NewCombinedStrips.insert(NewCombinedStrips.end(), OldOnes[listspot][combi1].begin(), OldOnes[listspot][combi1].end()); - NewCombinedStrips.insert(NewCombinedStrips.end(), OldOnes[listspot][combi2].begin(), OldOnes[listspot][combi2].end()); - sort(NewCombinedStrips.begin(), NewCombinedStrips.end()); + for (unsigned int combi1 = 0; combi1 < OldOnes[listspot].size(); ++combi1) { // Iterate over individual combos within set + for (unsigned int combi2 = combi1 + 1; combi2 < OldOnes[listspot].size(); ++combi2) { // Iterate through all the combos AFTER combi1 + vector NewCombinedStrips; + // Reserve once since this temporary vector is rebuilt in the innermost hot loop. + NewCombinedStrips.reserve(OldOnes[listspot][combi1].size() + OldOnes[listspot][combi2].size()); + NewCombinedStrips.insert(NewCombinedStrips.end(), OldOnes[listspot][combi1].begin(), OldOnes[listspot][combi1].end()); + NewCombinedStrips.insert(NewCombinedStrips.end(), OldOnes[listspot][combi2].begin(), OldOnes[listspot][combi2].end()); + sort(NewCombinedStrips.begin(), NewCombinedStrips.end()); // The above combines each combination with all the subsequent combinations in order to produce new combinations of strips vector NewCombinedAsIDs; + // Reserve once since this temporary vector mirrors NewCombinedStrips in size. + NewCombinedAsIDs.reserve(NewCombinedStrips.size()); for (unsigned int s = 0; s < NewCombinedStrips.size(); ++s) { NewCombinedAsIDs.push_back(StripHits[NewCombinedStrips[s]]->GetStripID()); // Translates the hit number to the actual strip ID } @@ -211,7 +215,7 @@ vector>> MModuleStripPairingMultiRoundChiSquare::Fin //////////////////////////////////////////////////////////////////////////////// //! Apply a charge trapping correction to each potential pair of LV/HV strips -float MModuleStripPairingMultiRoundChiSquare::ChargeTrappingCorrection(unsigned int d, vector> StripHits) +float MModuleStripPairingMultiRoundChiSquare::ChargeTrappingCorrection(unsigned int d, const vector>& StripHits) { // Dummy Function @@ -269,7 +273,7 @@ vector>> MModuleStripPairingMultiRoundChiSquare::Colle //////////////////////////////////////////////////////////////////////////////// //! Read in strip hits on each side for each detector and perform quality selections -bool MModuleStripPairingMultiRoundChiSquare::EventSelection(MReadOutAssembly* Event, vector>> StripHits) +bool MModuleStripPairingMultiRoundChiSquare::EventSelection(MReadOutAssembly* Event, const vector>>& StripHits) { // Limit the number of strip hits on each side @@ -296,7 +300,7 @@ bool MModuleStripPairingMultiRoundChiSquare::EventSelection(MReadOutAssembly* Ev //////////////////////////////////////////////////////////////////////////////// //! Find all strip combinations for each detector on LV and HV sides given seed combinations -vector>>>> MModuleStripPairingMultiRoundChiSquare::FindAllCombinations(unsigned int d, vector>>>> Combinations, vector>> StripHits, bool RoundTwo) +void MModuleStripPairingMultiRoundChiSquare::FindAllCombinations(unsigned int d, vector>>>>& Combinations, const vector>>& StripHits, bool RoundTwo) { for (unsigned int side = 0; side <= 1; ++side) { // Side loop (LV and HV) @@ -310,44 +314,48 @@ vector>>>> MModuleStripPairingMultiRou NewCombinations = FindNewCombinations(Combinations[d][side], StripHits[d][side], RoundTwo); //cout<<"Size: "< 0) { + if (NewCombinations.empty() == false) { //cout<>, vector>, double> MModuleStripPairingMultiRoundChiSquare::EvaluateAllCombinations(unsigned int d, vector>>>> Combinations, vector>> StripHits) +tuple>, vector>, double> MModuleStripPairingMultiRoundChiSquare::EvaluateAllCombinations(unsigned int d, const vector>>>>& Combinations, const vector>>& StripHits) { double BestChiSquare = numeric_limits::max(); @@ -356,8 +364,10 @@ tuple>, vector>, double> MModul for (unsigned int lv = 0; lv < Combinations[d][0].size(); ++lv) { // Loop over combinations of lv-strips (lv represents a list of sets of strips, and each set is a proposed Hit) for (unsigned int hv = 0; hv < Combinations[d][1].size(); ++hv) { - - unsigned int MinSize = min(Combinations[d][0][lv].size(), Combinations[d][1][hv].size()); + // Copy only the current LV/HV combination that will be permuted below instead of the full 5D combinations tree. + vector> LVSideCombo = Combinations[d][0][lv]; + vector> HVSideCombo = Combinations[d][1][hv]; + unsigned int MinSize = min(LVSideCombo.size(), HVSideCombo.size()); bool MorePermutations = true; while (MorePermutations == true) { @@ -376,24 +386,24 @@ tuple>, vector>, double> MModul double LVResolution = 0; // Add up LV energy and energy resolution for grouping of strips - for (unsigned int entry = 0; entry < Combinations[d][0][lv][en].size(); ++entry) { // Entry is on the strip level - LVEnergy += StripHits[d][0][Combinations[d][0][lv][en][entry]]->GetEnergy(); - LVResolution += pow(StripHits[d][0][Combinations[d][0][lv][en][entry]]->GetEnergyResolution(), 2); + for (unsigned int entry = 0; entry < LVSideCombo[en].size(); ++entry) { // Entry is on the strip level + LVEnergy += StripHits[d][0][LVSideCombo[en][entry]]->GetEnergy(); + LVResolution += pow(StripHits[d][0][LVSideCombo[en][entry]]->GetEnergyResolution(), 2); // Add strip to current hit pairing - CurrentHitPairing[0].push_back(StripHits[d][0][Combinations[d][0][lv][en][entry]]); + CurrentHitPairing[0].push_back(StripHits[d][0][LVSideCombo[en][entry]]); } // Repeats for HV side double HVEnergy = 0; double HVResolution = 0; - for (unsigned int entry = 0; entry < Combinations[d][1][hv][ep].size(); ++entry) { - HVEnergy += StripHits[d][1][Combinations[d][1][hv][ep][entry]]->GetEnergy(); - HVResolution += pow(StripHits[d][1][Combinations[d][1][hv][ep][entry]]->GetEnergyResolution(), 2); + for (unsigned int entry = 0; entry < HVSideCombo[ep].size(); ++entry) { + HVEnergy += StripHits[d][1][HVSideCombo[ep][entry]]->GetEnergy(); + HVResolution += pow(StripHits[d][1][HVSideCombo[ep][entry]]->GetEnergyResolution(), 2); // Add strip to current hit pairing - CurrentHitPairing[1].push_back(StripHits[d][1][Combinations[d][1][hv][ep][entry]]); + CurrentHitPairing[1].push_back(StripHits[d][1][HVSideCombo[ep][entry]]); } // Apply charge trapping correction for each LV/HV pairing @@ -410,15 +420,15 @@ tuple>, vector>, double> MModul if (ChiSquare < BestChiSquare) { BestChiSquare = ChiSquare; - BestLVSideCombo = Combinations[d][0][lv]; - BestHVSideCombo = Combinations[d][1][hv]; + BestLVSideCombo = LVSideCombo; + BestHVSideCombo = HVSideCombo; } // Cycle through all permutations to reach every possible strip pairing - if (Combinations[d][1][hv].size() > Combinations[d][0][lv].size()) { - MorePermutations = next_permutation(Combinations[d][1][hv].begin(), Combinations[d][1][hv].end()); + if (HVSideCombo.size() > LVSideCombo.size()) { + MorePermutations = next_permutation(HVSideCombo.begin(), HVSideCombo.end()); } else { - MorePermutations = next_permutation(Combinations[d][0][lv].begin(), Combinations[d][0][lv].end()); + MorePermutations = next_permutation(LVSideCombo.begin(), LVSideCombo.end()); } } } @@ -429,7 +439,7 @@ tuple>, vector>, double> MModul //////////////////////////////////////////////////////////////////////////////// //! Create hits -bool MModuleStripPairingMultiRoundChiSquare::CreateHits(unsigned int d, MReadOutAssembly* Event, vector>> StripHits, vector> BestLVSideCombo, vector> BestHVSideCombo) +bool MModuleStripPairingMultiRoundChiSquare::CreateHits(unsigned int d, MReadOutAssembly* Event, const vector>>& StripHits, const vector>& BestLVSideCombo, const vector>& BestHVSideCombo) { @@ -704,7 +714,6 @@ bool MModuleStripPairingMultiRoundChiSquare::CreateHits(unsigned int d, MReadOut //! Main data analysis routine, which updates the event to a new level bool MModuleStripPairingMultiRoundChiSquare::AnalyzeEvent(MReadOutAssembly* Event) { - // Check if there are actually any strip hits if (Event->GetNStripHits() == 0) { Event->SetStripPairingError("No strip hits"); @@ -750,7 +759,7 @@ bool MModuleStripPairingMultiRoundChiSquare::AnalyzeEvent(MReadOutAssembly* Even bool RoundTwo = false; // Find all possible combinations based on the above seed combination - Combinations = FindAllCombinations(d, Combinations, StripHits, RoundTwo); + FindAllCombinations(d, Combinations, StripHits, RoundTwo); // Evaluate reduced chi square for all combinations and select best LV/HV combinations auto [BestLVSideCombo, BestHVSideCombo, BestChiSquare] = EvaluateAllCombinations(d, Combinations, StripHits); @@ -759,7 +768,7 @@ bool MModuleStripPairingMultiRoundChiSquare::AnalyzeEvent(MReadOutAssembly* Even RoundTwo = true; // Repeat strip pairing, now allowing groupings of non adjacent strips - Combinations = FindAllCombinations(d, Combinations, StripHits, RoundTwo); + FindAllCombinations(d, Combinations, StripHits, RoundTwo); auto [BestLVSideComboRoundTwo, BestHVSideComboRoundTwo, BestChiSquareRoundTwo] = EvaluateAllCombinations(d, Combinations, StripHits); // Update best LV/HV combos if a better pairing is found From d73b58bcc0a06440af4a7c53983e2916f55881c7 Mon Sep 17 00:00:00 2001 From: ckierans Date: Tue, 14 Apr 2026 01:04:54 -0400 Subject: [PATCH 02/20] Included option to save QA-flagged events Cherry-picked this commit from PR148 to apply seperately --- include/MGUIOptionsEventSaver.h | 3 +++ include/MModuleEventSaver.h | 8 ++++++++ include/MReadOutAssembly.h | 2 ++ src/MGUIOptionsEventSaver.cxx | 5 +++++ src/MModuleDepthCalibration.cxx | 2 -- src/MModuleEventSaver.cxx | 10 ++++++++++ src/MReadOutAssembly.cxx | 27 +++++++++++++++++++++++++-- 7 files changed, 53 insertions(+), 4 deletions(-) diff --git a/include/MGUIOptionsEventSaver.h b/include/MGUIOptionsEventSaver.h index fe466302..a6f79050 100644 --- a/include/MGUIOptionsEventSaver.h +++ b/include/MGUIOptionsEventSaver.h @@ -81,6 +81,9 @@ class MGUIOptionsEventSaver : public MGUIOptions //! Checkbutton to save or reject bad events TGCheckButton* m_SaveBadEvents; + //! Checkbutton to save or reject quality flag events + TGCheckButton* m_SavePoorQualityEvents; + //! Checkbutton to save veto events TGCheckButton* m_SaveVetoEvents; diff --git a/include/MModuleEventSaver.h b/include/MModuleEventSaver.h index e3f1d952..44064268 100644 --- a/include/MModuleEventSaver.h +++ b/include/MModuleEventSaver.h @@ -63,6 +63,11 @@ class MModuleEventSaver : public MModule //! Set whether the Bad events should be saved void SetSaveBadEvents(bool SaveBadEvents) { m_SaveBadEvents = SaveBadEvents; } + //! Return true if the Poor Quality events should be saved + bool GetSavePoorQualityEvents() const { return m_SavePoorQualityEvents; } + //! Set whether the Poor Quality events should be saved + void SetSavePoorQualityEvents(bool SavePoorQualityEvents) { m_SavePoorQualityEvents = SavePoorQualityEvents; } + //! Return true if the Veto events should be saved bool GetSaveVetoEvents() const { return m_SaveVetoEvents; } //! Set whether the Veto events should be saved @@ -193,6 +198,9 @@ class MModuleEventSaver : public MModule //! Save bad events bool m_SaveBadEvents; + //! Save poor quality events + bool m_SavePoorQualityEvents; + //! Save Veto events bool m_SaveVetoEvents; diff --git a/include/MReadOutAssembly.h b/include/MReadOutAssembly.h index 9d5005f5..1da4a236 100644 --- a/include/MReadOutAssembly.h +++ b/include/MReadOutAssembly.h @@ -249,6 +249,8 @@ class MReadOutAssembly : public MReadOutSequence bool IsGood() const; //! Returns true if any of the "bad" or "Error" flags has been set bool IsBad() const; + //! Returns true if any of the Quality flags have been set + bool IsPoorQuality() const; //! Set a specific analysis progress void SetAnalysisProgress(uint64_t Progress) { m_AnalysisProgress |= Progress; } diff --git a/src/MGUIOptionsEventSaver.cxx b/src/MGUIOptionsEventSaver.cxx index ab913a43..832203e4 100644 --- a/src/MGUIOptionsEventSaver.cxx +++ b/src/MGUIOptionsEventSaver.cxx @@ -108,6 +108,10 @@ void MGUIOptionsEventSaver::Create() m_SaveBadEvents->SetOn(dynamic_cast(m_Module)->GetSaveBadEvents()); GeneralFrame->AddFrame(m_SaveBadEvents, FirstLabelLayout); + m_SavePoorQualityEvents = new TGCheckButton(GeneralFrame, "Save events with quality flag (QA)", 1); + m_SavePoorQualityEvents->SetOn(dynamic_cast(m_Module)->GetSavePoorQualityEvents()); + GeneralFrame->AddFrame(m_SavePoorQualityEvents, FirstLabelLayout); + m_SaveVetoEvents = new TGCheckButton(GeneralFrame, "Save guard ring and shield veto events (Veto)", 1); m_SaveVetoEvents->SetOn(dynamic_cast(m_Module)->GetSaveVetoEvents()); GeneralFrame->AddFrame(m_SaveVetoEvents, TightButtonLayout); @@ -229,6 +233,7 @@ bool MGUIOptionsEventSaver::OnApply() dynamic_cast(m_Module)->SetFileName(m_FileSelector->GetFileName()); dynamic_cast(m_Module)->SetSaveBadEvents(m_SaveBadEvents->IsOn()); + dynamic_cast(m_Module)->SetSavePoorQualityEvents(m_SavePoorQualityEvents->IsOn()); dynamic_cast(m_Module)->SetSaveVetoEvents(m_SaveVetoEvents->IsOn()); dynamic_cast(m_Module)->SetAddTimeTag(m_AddTimeTag->IsOn()); dynamic_cast(m_Module)->SetSplitFile(m_SplitFile->IsOn()); diff --git a/src/MModuleDepthCalibration.cxx b/src/MModuleDepthCalibration.cxx index 1d24feb8..88cb75ca 100644 --- a/src/MModuleDepthCalibration.cxx +++ b/src/MModuleDepthCalibration.cxx @@ -503,8 +503,6 @@ bool MModuleDepthCalibration::LoadCoeffsFile(MString FileName) std::vector Tokens = Line.Tokenize(","); if (Tokens.size() == 5) { int PixelCode = Tokens[0].ToInt(); - double Stretch = Tokens[1].ToDouble(); - double Offset = Tokens[2].ToDouble(); double CTD_FWHM = Tokens[3].ToDouble() * 2.355; double Chi2 = Tokens[4].ToDouble(); // Previous iteration of depth calibration read in "Scale" instead of ctd resolution. diff --git a/src/MModuleEventSaver.cxx b/src/MModuleEventSaver.cxx index dc7671c3..c1ff7e08 100644 --- a/src/MModuleEventSaver.cxx +++ b/src/MModuleEventSaver.cxx @@ -75,6 +75,7 @@ MModuleEventSaver::MModuleEventSaver() : MModule() m_InternalFileName = ""; m_Zip = false; m_SaveBadEvents = true; + m_SavePoorQualityEvents = true; m_SaveVetoEvents = true; m_AddTimeTag = false; @@ -345,6 +346,10 @@ bool MModuleEventSaver::AnalyzeEvent(MReadOutAssembly* Event) if (Event->IsBad() == true) return true; } + if (m_SavePoorQualityEvents == false) { + if (Event->IsPoorQuality() == true) return true; + } + if (m_SaveVetoEvents == false) { if (Event->IsVeto() == true) return true; } @@ -415,6 +420,10 @@ bool MModuleEventSaver::ReadXmlConfiguration(MXmlNode* Node) if (SaveBadEventsNode != 0) { m_SaveBadEvents = SaveBadEventsNode->GetValueAsBoolean(); } + MXmlNode* SavePoorQualityEventsNode = Node->GetNode("SavePoorQualityEvents"); + if (SavePoorQualityEventsNode != 0) { + m_SavePoorQualityEvents = SavePoorQualityEventsNode->GetValueAsBoolean(); + } MXmlNode* SaveVetoEventsNode = Node->GetNode("SaveVetoEvents"); if (SaveVetoEventsNode != 0) { m_SaveVetoEvents = SaveVetoEventsNode->GetValueAsBoolean(); @@ -480,6 +489,7 @@ MXmlNode* MModuleEventSaver::CreateXmlConfiguration() new MXmlNode(Node, "FileName", m_FileName); new MXmlNode(Node, "Mode", m_Mode); new MXmlNode(Node, "SaveBadEvents", m_SaveBadEvents); + new MXmlNode(Node, "SavePoorQualityEvents", m_SavePoorQualityEvents); new MXmlNode(Node, "SaveVetoEvents", m_SaveVetoEvents); new MXmlNode(Node, "AddTimeTag", m_AddTimeTag); new MXmlNode(Node, "SplitFile", m_SplitFile); diff --git a/src/MReadOutAssembly.cxx b/src/MReadOutAssembly.cxx index d4084d83..905e327f 100644 --- a/src/MReadOutAssembly.cxx +++ b/src/MReadOutAssembly.cxx @@ -618,7 +618,13 @@ void MReadOutAssembly::StreamEvta(ostream& S) } for (unsigned int h = 0; h < m_Hits.size(); ++h) { - m_Hits[h]->StreamEvta(S); + // Don't print Guard Ring hits as normal strip hits as they don't have positions defined + // the corresponding energy is saved in the StripPairing QA message + if (m_Hits[h]->GetGuardRingHitFlag() == true) { + continue; + } else { + m_Hits[h]->StreamEvta(S); + } } S<<"CC NStripHits "< Date: Tue, 19 May 2026 00:38:23 -0400 Subject: [PATCH 03/20] Fixed missing lines after cherry pick --- src/MModuleDepthCalibration.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/MModuleDepthCalibration.cxx b/src/MModuleDepthCalibration.cxx index 88cb75ca..1d24feb8 100644 --- a/src/MModuleDepthCalibration.cxx +++ b/src/MModuleDepthCalibration.cxx @@ -503,6 +503,8 @@ bool MModuleDepthCalibration::LoadCoeffsFile(MString FileName) std::vector Tokens = Line.Tokenize(","); if (Tokens.size() == 5) { int PixelCode = Tokens[0].ToInt(); + double Stretch = Tokens[1].ToDouble(); + double Offset = Tokens[2].ToDouble(); double CTD_FWHM = Tokens[3].ToDouble() * 2.355; double Chi2 = Tokens[4].ToDouble(); // Previous iteration of depth calibration read in "Scale" instead of ctd resolution. From 87c75aea16fffff627b8d82058d1a3c6adde64a2 Mon Sep 17 00:00:00 2001 From: ckierans Date: Tue, 19 May 2026 00:43:28 -0400 Subject: [PATCH 04/20] Button layout --- src/MGUIOptionsEventSaver.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MGUIOptionsEventSaver.cxx b/src/MGUIOptionsEventSaver.cxx index 832203e4..20328f33 100644 --- a/src/MGUIOptionsEventSaver.cxx +++ b/src/MGUIOptionsEventSaver.cxx @@ -110,7 +110,7 @@ void MGUIOptionsEventSaver::Create() m_SavePoorQualityEvents = new TGCheckButton(GeneralFrame, "Save events with quality flag (QA)", 1); m_SavePoorQualityEvents->SetOn(dynamic_cast(m_Module)->GetSavePoorQualityEvents()); - GeneralFrame->AddFrame(m_SavePoorQualityEvents, FirstLabelLayout); + GeneralFrame->AddFrame(m_SavePoorQualityEvents, TightButtonLayout); m_SaveVetoEvents = new TGCheckButton(GeneralFrame, "Save guard ring and shield veto events (Veto)", 1); m_SaveVetoEvents->SetOn(dynamic_cast(m_Module)->GetSaveVetoEvents()); From d96b0ec372ebd5fb0d5102085efe13ee8e2a5b0a Mon Sep 17 00:00:00 2001 From: Julian Gerber Date: Thu, 23 Jul 2026 15:25:46 -0700 Subject: [PATCH 05/20] Separate out NN and triggered strips when collecting strip pairing strips --- ...MModuleStripPairingMultiRoundChiSquare.cxx | 47 ++++++++++--------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/src/MModuleStripPairingMultiRoundChiSquare.cxx b/src/MModuleStripPairingMultiRoundChiSquare.cxx index 3b6b00c4..c64e3c64 100644 --- a/src/MModuleStripPairingMultiRoundChiSquare.cxx +++ b/src/MModuleStripPairingMultiRoundChiSquare.cxx @@ -243,28 +243,33 @@ vector>> MModuleStripPairingMultiRoundChiSquare::Colle for (unsigned int sh = 0; sh < Event->GetNStripHits(); ++sh) { // Populate StripHits with this event's strip hits MStripHit* SH = Event->GetStripHit(sh); - unsigned int Side = (SH->IsLowVoltageStrip() == true) ? 0 : 1; - - // Check if detector is on list - bool DetectorFound = false; - unsigned int DetectorPos = 0; - for (unsigned int d = 0; d < DetectorIDs.size(); ++d) { - if (DetectorIDs[d] == SH->GetDetectorID()) { - DetectorFound = true; - DetectorPos = d; + + // Separate out the triggered and NN strip hits + if SH->IsNearestNeighbor() == false { + + unsigned int Side = (SH->IsLowVoltageStrip() == true) ? 0 : 1; + + // Check if detector is on list + bool DetectorFound = false; + unsigned int DetectorPos = 0; + for (unsigned int d = 0; d < DetectorIDs.size(); ++d) { + if (DetectorIDs[d] == SH->GetDetectorID()) { + DetectorFound = true; + DetectorPos = d; + } + } + + // Once the correct detector is found, add strip hit to StripHits + if (DetectorFound == true) { + StripHits[DetectorPos][Side].push_back(SH); + } else { // If encountering a new detector, initialize list of sides/hits corresponding to that detector + vector> List; // list of sides, list of hits + List.push_back(vector()); // LV + List.push_back(vector()); // HV + List[Side].push_back(SH); + StripHits.push_back(List); + DetectorIDs.push_back(SH->GetDetectorID()); } - } - - // Once the correct detector is found, add strip hit to StripHits - if (DetectorFound == true) { - StripHits[DetectorPos][Side].push_back(SH); - } else { // If encountering a new detector, initialize list of sides/hits corresponding to that detector - vector> List; // list of sides, list of hits - List.push_back(vector()); // LV - List.push_back(vector()); // HV - List[Side].push_back(SH); - StripHits.push_back(List); - DetectorIDs.push_back(SH->GetDetectorID()); } } return StripHits; From 633cf5d22ef51dabcc07b84d195352ff80899efa Mon Sep 17 00:00:00 2001 From: Julian Gerber Date: Thu, 23 Jul 2026 15:28:38 -0700 Subject: [PATCH 06/20] commenting --- src/MModuleStripPairingMultiRoundChiSquare.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MModuleStripPairingMultiRoundChiSquare.cxx b/src/MModuleStripPairingMultiRoundChiSquare.cxx index c64e3c64..fd2bae08 100644 --- a/src/MModuleStripPairingMultiRoundChiSquare.cxx +++ b/src/MModuleStripPairingMultiRoundChiSquare.cxx @@ -281,7 +281,7 @@ vector>> MModuleStripPairingMultiRoundChiSquare::Colle bool MModuleStripPairingMultiRoundChiSquare::EventSelection(MReadOutAssembly* Event, const vector>>& StripHits) { - // Limit the number of strip hits on each side + // Limit the number of (triggered) strip hits on each side for (unsigned int d = 0; d < StripHits.size(); ++d) { // Detector loop for (unsigned int side = 0; side <= 1; ++side) { // Side loop if (StripHits[d][side].size() > m_MaximumStrips) { From a872494010fb83f466e9be067c2cc857c8c68432 Mon Sep 17 00:00:00 2001 From: Julian Gerber Date: Thu, 23 Jul 2026 15:37:17 -0700 Subject: [PATCH 07/20] function to collect NN strip hits --- .../MModuleStripPairingMultiRoundChiSquare.h | 5 +++ ...MModuleStripPairingMultiRoundChiSquare.cxx | 44 +++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/include/MModuleStripPairingMultiRoundChiSquare.h b/include/MModuleStripPairingMultiRoundChiSquare.h index ccdb8e72..c57274ef 100644 --- a/include/MModuleStripPairingMultiRoundChiSquare.h +++ b/include/MModuleStripPairingMultiRoundChiSquare.h @@ -88,6 +88,10 @@ class MModuleStripPairingMultiRoundChiSquare : public MModule //! Divide an event's strip hits by detector and LV/HV side vector>> CollectStripHits(MReadOutAssembly* Event); + + //! Divide an event's nearest neighbor strip hits by detector and LV/HV side + vector>> CollectNearestNeighborStripHits(MReadOutAssembly* Event); + //! Read in strip hits on each side for each detector and perform quality selections bool EventSelection(MReadOutAssembly* Event, const vector>>& StripHits); @@ -97,6 +101,7 @@ class MModuleStripPairingMultiRoundChiSquare : public MModule //! Evaluate the reduced chi square for all possible strip pairings tuple>, vector>, double> EvaluateAllCombinations(unsigned int d, const vector>>>>& Combinations, const vector>>& StripHits); + //! Create hits bool CreateHits(unsigned int d, MReadOutAssembly* Event, const vector>>& StripHits, const vector>& BestLVSideCombo, const vector>& BestHVSideCombo); //! Return the order of indices resulting from sorting a vector diff --git a/src/MModuleStripPairingMultiRoundChiSquare.cxx b/src/MModuleStripPairingMultiRoundChiSquare.cxx index fd2bae08..c24a9eb4 100644 --- a/src/MModuleStripPairingMultiRoundChiSquare.cxx +++ b/src/MModuleStripPairingMultiRoundChiSquare.cxx @@ -277,6 +277,50 @@ vector>> MModuleStripPairingMultiRoundChiSquare::Colle //////////////////////////////////////////////////////////////////////////////// +//! Divide an event's nearest neighbor strip hits by detector and LV/HV side +vector>> MModuleStripPairingMultiRoundChiSquare::CollectNearestNeighborStripHits(MReadOutAssembly* Event) +{ + + // Split hits by detector ID + vector DetectorIDs; // List of detector IDs + vector>> NNStripHits; // list of detector IDs, list of sides (LV and HV), list of strip hits + + for (unsigned int sh = 0; sh < Event->GetNStripHits(); ++sh) { // Populate StripHits with this event's NN strip hits + MStripHit* SH = Event->GetStripHit(sh); + + // Separate out the triggered and NN strip hits + if SH->IsNearestNeighbor() == true { + + unsigned int Side = (SH->IsLowVoltageStrip() == true) ? 0 : 1; + + // Check if detector is on list + bool DetectorFound = false; + unsigned int DetectorPos = 0; + for (unsigned int d = 0; d < DetectorIDs.size(); ++d) { + if (DetectorIDs[d] == SH->GetDetectorID()) { + DetectorFound = true; + DetectorPos = d; + } + } + + // Once the correct detector is found, add strip hit to StripHits + if (DetectorFound == true) { + NNStripHits[DetectorPos][Side].push_back(SH); + } else { // If encountering a new detector, initialize list of sides/hits corresponding to that detector + vector> List; // list of sides, list of hits + List.push_back(vector()); // LV + List.push_back(vector()); // HV + List[Side].push_back(SH); + NNStripHits.push_back(List); + DetectorIDs.push_back(SH->GetDetectorID()); + } + } + } + return NNStripHits; +} + +//////////////////////////////////////////////////////////////////////////////// + //! Read in strip hits on each side for each detector and perform quality selections bool MModuleStripPairingMultiRoundChiSquare::EventSelection(MReadOutAssembly* Event, const vector>>& StripHits) { From cc35e5ed858202c0d3d5dd38cd7947372f3146d6 Mon Sep 17 00:00:00 2001 From: Julian Gerber Date: Thu, 23 Jul 2026 17:09:59 -0700 Subject: [PATCH 08/20] Assign Nearest Neighbor function in strip pairing. Created new "addnearestneighborstriphit" function to MHit class --- include/MHit.h | 7 +++ .../MModuleStripPairingMultiRoundChiSquare.h | 4 +- src/MHit.cxx | 34 +++++++++++ ...MModuleStripPairingMultiRoundChiSquare.cxx | 58 ++++++++++++++++++- 4 files changed, 100 insertions(+), 3 deletions(-) diff --git a/include/MHit.h b/include/MHit.h index a44ac6b6..8398a9a9 100644 --- a/include/MHit.h +++ b/include/MHit.h @@ -52,9 +52,13 @@ class MHit //! Return strip hit i or nullptr if i is out of bounds //! Ownership stays elsewhere MStripHit* GetStripHit(unsigned int i); + //! Return nearest neighbor strip hit i or nullptr if i is out of bounds + MStripHit* GetNearestNeighborStripHit(unsigned int i); //! Add a strip hit //! Ownership stays elsewhere void AddStripHit(MStripHit* StripHit); + //! Add a nearest neighbor strip hit + void AddNearestNeighborStripHit(MStripHit* StripHit); //! Remove strip hit i without deleting it void RemoveStripHit(unsigned int i); //! Remove a strip hit without deleting it @@ -172,6 +176,9 @@ class MHit //! List of strip hits contributing to this hit //! Ownership stays elsewhere vector m_StripHits; + + //! List of nearest neighbor strip hits associated with this hit + vector m_NearestNeighborStripHits; //! Position of the hit MVector m_Position; diff --git a/include/MModuleStripPairingMultiRoundChiSquare.h b/include/MModuleStripPairingMultiRoundChiSquare.h index c57274ef..f88f3b95 100644 --- a/include/MModuleStripPairingMultiRoundChiSquare.h +++ b/include/MModuleStripPairingMultiRoundChiSquare.h @@ -91,7 +91,9 @@ class MModuleStripPairingMultiRoundChiSquare : public MModule //! Divide an event's nearest neighbor strip hits by detector and LV/HV side vector>> CollectNearestNeighborStripHits(MReadOutAssembly* Event); - + + //! Assign nearest neighbor strip hits to their associated hits + void AssignNearestNeighbors(MReadOutAssembly* Event); //! Read in strip hits on each side for each detector and perform quality selections bool EventSelection(MReadOutAssembly* Event, const vector>>& StripHits); diff --git a/src/MHit.cxx b/src/MHit.cxx index 260352c4..99bef17f 100644 --- a/src/MHit.cxx +++ b/src/MHit.cxx @@ -81,6 +81,7 @@ void MHit::Clear() m_EnergyResolution = g_DoubleNotDefined; m_StripHits.clear(); + m_NearestNeighborStripHits.clear(); m_Origins.clear(); m_CrossTalk = false; @@ -114,6 +115,24 @@ MStripHit* MHit::GetStripHit(unsigned int i) //////////////////////////////////////////////////////////////////////////////// +MStripHit* MHit::GetNearestNeighborStripHit(unsigned int i) +{ + // Return strip hit i + + if (i < m_NearestNeighborStripHits.size()) { + return m_StripHits[i]; + } + + if (g_Verbosity >= c_Error) cout<<"Error in MHit::GetNearestNeighborStripHit: Strip hit index "<= c_Error) cout<<"Error in MHit::AddNearestNeighborStripHit: Strip hit is nullptr"<>> MModuleStripPairingMultiRoundChiSquare::Colle } } - // Once the correct detector is found, add strip hit to StripHits + // Once the correct detector is found, add strip hit to NNStripHits if (DetectorFound == true) { NNStripHits[DetectorPos][Side].push_back(SH); } else { // If encountering a new detector, initialize list of sides/hits corresponding to that detector @@ -760,6 +760,56 @@ bool MModuleStripPairingMultiRoundChiSquare::CreateHits(unsigned int d, MReadOut //////////////////////////////////////////////////////////////////////////////// +//! Assign nearest neighbor strip hits to their appropriate hit +void MModuleStripPairingMultiRoundChiSquare::AssignNearestNeighbors(MReadOutAssembly* Event) { + + // Collect the NN strip hits + vector>> NNStripHits = CollectNearestNeighborStripHits(Event); // List of detectors, list of sides, list of strip hits + + for (unsigned int h = 0; h < Event->GetNHits(); h++) { + vector> StripIDs; // list of sides, list of strips + StripIDs.push_back(vector) // LV + StripIDs.push_back(vector) // HV + bool AssignedDetector = false; + int DetectorID; // Define detector ID where hit took place + for (unsigned int sh = 0; sh < Event->GetHit(h)->GetNStripHits(); sh++) { + // Collect all the strip hits in a hit and split them by side + MStripHit* SH = Event->GetHit(h)->GetStripHit(sh); + unsigned int Side = (SH->IsLowVoltageStrip() == true) ? 0 : 1; + StripIDs[Side].push_back(SH->GetStripID()) + + if (AssignedDetector == false) { + DetectorID = SH->GetDetectorID(); + AssignedDetector == true; + } + } + // For each side, find the edge strip hit. i.e if there's charge sharing between strips 4, 5, and 6, the edges will be 4 and 6 + int LeftEdgeLV = min_element(StripIDs[0].begin(), StripIDs[0].end()); + int RightEdgeLV = max_element(StripIDs[0].begin(), StripIDs[0].end()); + int LeftEdgeHV = min_element(StripIDs[1].begin(), StripIDs[1].end()); + int RightEdgeHV = max_element(StripIDs[1].begin(), StripIDs[1].end()); + + // NOTE: If there are two hits that are one strip hit apart, then the NN strip hit will be added to both hits + // Should there be some flag for the case where it's ambiguous which hit a neighbor should be assigned to? + + // Define the LV neighbors + for (unsigned int sh = 0; sh < NNStripHits[DetectorID][0].size(); sh++) { + if (NNStripHits[DetectorID][0][sh]->GetStripID() == LeftEdgeLV - 1) or (NNStripHits[DetectorID][0][sh]->GetStripID() == RightEdgeLV + 1) { + Event->GetHit(h)->AddNearestNeighborStripHit(NNStripHits[DetectorID][0][sh]); + } + } + + // Define the HV neighbors + for (unsigned int sh = 0; sh < NNStripHits[DetectorID][1].size(); sh++) { + if (NNStripHits[DetectorID][1][sh]->GetStripID() == LeftEdgeHV - 1) or (NNStripHits[DetectorID][1][sh]->GetStripID() == RightEdgeHV + 1) { + Event->GetHit(h)->AddNearestNeighborStripHit(NNStripHits[DetectorID][1][sh]); + } + } + } +} + +//////////////////////////////////////////////////////////////////////////////// + //! Main data analysis routine, which updates the event to a new level bool MModuleStripPairingMultiRoundChiSquare::AnalyzeEvent(MReadOutAssembly* Event) { @@ -888,7 +938,11 @@ bool MModuleStripPairingMultiRoundChiSquare::AnalyzeEvent(MReadOutAssembly* Even } } // End Detector loop - + // If including nearest neighbors strips, assign them to their appropriate hits + if (m_IncludeNearestNeighbor == true) { + AssignNearestNeighbors(Event); + } + Event->SetAnalysisProgress(MAssembly::c_StripPairing); return true; From 14bce2eee04453b7b87ef74fcc21996b43a64515 Mon Sep 17 00:00:00 2001 From: Julian Gerber Date: Thu, 23 Jul 2026 17:29:43 -0700 Subject: [PATCH 09/20] bug fixes --- ...MModuleStripPairingMultiRoundChiSquare.cxx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/MModuleStripPairingMultiRoundChiSquare.cxx b/src/MModuleStripPairingMultiRoundChiSquare.cxx index d66c240e..0ff1e113 100644 --- a/src/MModuleStripPairingMultiRoundChiSquare.cxx +++ b/src/MModuleStripPairingMultiRoundChiSquare.cxx @@ -245,7 +245,7 @@ vector>> MModuleStripPairingMultiRoundChiSquare::Colle MStripHit* SH = Event->GetStripHit(sh); // Separate out the triggered and NN strip hits - if SH->IsNearestNeighbor() == false { + if (SH->IsNearestNeighbor() == false) { unsigned int Side = (SH->IsLowVoltageStrip() == true) ? 0 : 1; @@ -289,7 +289,7 @@ vector>> MModuleStripPairingMultiRoundChiSquare::Colle MStripHit* SH = Event->GetStripHit(sh); // Separate out the triggered and NN strip hits - if SH->IsNearestNeighbor() == true { + if (SH->IsNearestNeighbor() == true) { unsigned int Side = (SH->IsLowVoltageStrip() == true) ? 0 : 1; @@ -768,40 +768,40 @@ void MModuleStripPairingMultiRoundChiSquare::AssignNearestNeighbors(MReadOutAsse for (unsigned int h = 0; h < Event->GetNHits(); h++) { vector> StripIDs; // list of sides, list of strips - StripIDs.push_back(vector) // LV - StripIDs.push_back(vector) // HV + StripIDs.push_back(vector()); // LV + StripIDs.push_back(vector()); // HV bool AssignedDetector = false; int DetectorID; // Define detector ID where hit took place for (unsigned int sh = 0; sh < Event->GetHit(h)->GetNStripHits(); sh++) { // Collect all the strip hits in a hit and split them by side MStripHit* SH = Event->GetHit(h)->GetStripHit(sh); unsigned int Side = (SH->IsLowVoltageStrip() == true) ? 0 : 1; - StripIDs[Side].push_back(SH->GetStripID()) + StripIDs[Side].push_back(SH->GetStripID()); if (AssignedDetector == false) { DetectorID = SH->GetDetectorID(); - AssignedDetector == true; + AssignedDetector = true; } } // For each side, find the edge strip hit. i.e if there's charge sharing between strips 4, 5, and 6, the edges will be 4 and 6 - int LeftEdgeLV = min_element(StripIDs[0].begin(), StripIDs[0].end()); - int RightEdgeLV = max_element(StripIDs[0].begin(), StripIDs[0].end()); - int LeftEdgeHV = min_element(StripIDs[1].begin(), StripIDs[1].end()); - int RightEdgeHV = max_element(StripIDs[1].begin(), StripIDs[1].end()); + int LeftEdgeLV = *min_element(StripIDs[0].begin(), StripIDs[0].end()); + int RightEdgeLV = *max_element(StripIDs[0].begin(), StripIDs[0].end()); + int LeftEdgeHV = *min_element(StripIDs[1].begin(), StripIDs[1].end()); + int RightEdgeHV = *max_element(StripIDs[1].begin(), StripIDs[1].end()); // NOTE: If there are two hits that are one strip hit apart, then the NN strip hit will be added to both hits // Should there be some flag for the case where it's ambiguous which hit a neighbor should be assigned to? // Define the LV neighbors for (unsigned int sh = 0; sh < NNStripHits[DetectorID][0].size(); sh++) { - if (NNStripHits[DetectorID][0][sh]->GetStripID() == LeftEdgeLV - 1) or (NNStripHits[DetectorID][0][sh]->GetStripID() == RightEdgeLV + 1) { + if ((NNStripHits[DetectorID][0][sh]->GetStripID() == LeftEdgeLV - 1) or (NNStripHits[DetectorID][0][sh]->GetStripID() == RightEdgeLV + 1)) { Event->GetHit(h)->AddNearestNeighborStripHit(NNStripHits[DetectorID][0][sh]); } } // Define the HV neighbors for (unsigned int sh = 0; sh < NNStripHits[DetectorID][1].size(); sh++) { - if (NNStripHits[DetectorID][1][sh]->GetStripID() == LeftEdgeHV - 1) or (NNStripHits[DetectorID][1][sh]->GetStripID() == RightEdgeHV + 1) { + if ((NNStripHits[DetectorID][1][sh]->GetStripID() == LeftEdgeHV - 1) or (NNStripHits[DetectorID][1][sh]->GetStripID() == RightEdgeHV + 1)) { Event->GetHit(h)->AddNearestNeighborStripHit(NNStripHits[DetectorID][1][sh]); } } From 6a721e86414aefe5c89eaa728d79bdbd66085d42 Mon Sep 17 00:00:00 2001 From: Julian Gerber Date: Thu, 23 Jul 2026 17:42:24 -0700 Subject: [PATCH 10/20] adding variable to tell if nearest neighbors are included in strip hits --- .../MModuleStripPairingMultiRoundChiSquare.h | 2 +- ...MModuleStripPairingMultiRoundChiSquare.cxx | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/include/MModuleStripPairingMultiRoundChiSquare.h b/include/MModuleStripPairingMultiRoundChiSquare.h index f88f3b95..24b3a3d8 100644 --- a/include/MModuleStripPairingMultiRoundChiSquare.h +++ b/include/MModuleStripPairingMultiRoundChiSquare.h @@ -87,7 +87,7 @@ class MModuleStripPairingMultiRoundChiSquare : public MModule float ChargeTrappingCorrection(unsigned int d, const vector>& StripHits); //! Divide an event's strip hits by detector and LV/HV side - vector>> CollectStripHits(MReadOutAssembly* Event); + tuple>>, bool> CollectStripHits(MReadOutAssembly* Event); //! Divide an event's nearest neighbor strip hits by detector and LV/HV side vector>> CollectNearestNeighborStripHits(MReadOutAssembly* Event); diff --git a/src/MModuleStripPairingMultiRoundChiSquare.cxx b/src/MModuleStripPairingMultiRoundChiSquare.cxx index 0ff1e113..a69451f3 100644 --- a/src/MModuleStripPairingMultiRoundChiSquare.cxx +++ b/src/MModuleStripPairingMultiRoundChiSquare.cxx @@ -234,12 +234,13 @@ float MModuleStripPairingMultiRoundChiSquare::ChargeTrappingCorrection(unsigned //////////////////////////////////////////////////////////////////////////////// //! Divide an event's strip hits by detector and LV/HV side -vector>> MModuleStripPairingMultiRoundChiSquare::CollectStripHits(MReadOutAssembly* Event) +tuple>>, bool> MModuleStripPairingMultiRoundChiSquare::CollectStripHits(MReadOutAssembly* Event) { // Split hits by detector ID vector DetectorIDs; // List of detector IDs vector>> StripHits; // list of detector IDs, list of sides (LV and HV), list of strip hits + bool IncludingNearestNeighbors = false; for (unsigned int sh = 0; sh < Event->GetNStripHits(); ++sh) { // Populate StripHits with this event's strip hits MStripHit* SH = Event->GetStripHit(sh); @@ -271,8 +272,11 @@ vector>> MModuleStripPairingMultiRoundChiSquare::Colle DetectorIDs.push_back(SH->GetDetectorID()); } } + else { + IncludingNearestNeighbors = true; + } } - return StripHits; + return {StripHits, IncludingNearestNeighbors}; } //////////////////////////////////////////////////////////////////////////////// @@ -762,8 +766,7 @@ bool MModuleStripPairingMultiRoundChiSquare::CreateHits(unsigned int d, MReadOut //! Assign nearest neighbor strip hits to their appropriate hit void MModuleStripPairingMultiRoundChiSquare::AssignNearestNeighbors(MReadOutAssembly* Event) { - - // Collect the NN strip hits + vector>> NNStripHits = CollectNearestNeighborStripHits(Event); // List of detectors, list of sides, list of strip hits for (unsigned int h = 0; h < Event->GetNHits(); h++) { @@ -821,7 +824,7 @@ bool MModuleStripPairingMultiRoundChiSquare::AnalyzeEvent(MReadOutAssembly* Even } // Collect strip hits from input event - vector>> StripHits = CollectStripHits(Event); // List of detectors, list of sides, list of strip hits + auto [StripHits, IncludingNearestNeighbors] = CollectStripHits(Event); // List of detectors, list of sides, list of strip hits (and bool saying if running with nearest neighbors or not // Perform some event selections bool CheckStripHits = EventSelection(Event, StripHits); @@ -938,8 +941,10 @@ bool MModuleStripPairingMultiRoundChiSquare::AnalyzeEvent(MReadOutAssembly* Even } } // End Detector loop - // If including nearest neighbors strips, assign them to their appropriate hits - if (m_IncludeNearestNeighbor == true) { + + // Collect the NN strip hits, if any + + if (IncludingNearestNeighbors == true) { AssignNearestNeighbors(Event); } From a9fb662f4471af340f6e59de73bfac2895bb0d8c Mon Sep 17 00:00:00 2001 From: Julian Gerber Date: Thu, 23 Jul 2026 18:00:43 -0700 Subject: [PATCH 11/20] comment --- src/MModuleStripPairingMultiRoundChiSquare.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/MModuleStripPairingMultiRoundChiSquare.cxx b/src/MModuleStripPairingMultiRoundChiSquare.cxx index a69451f3..4ab7818d 100644 --- a/src/MModuleStripPairingMultiRoundChiSquare.cxx +++ b/src/MModuleStripPairingMultiRoundChiSquare.cxx @@ -942,8 +942,7 @@ bool MModuleStripPairingMultiRoundChiSquare::AnalyzeEvent(MReadOutAssembly* Even } // End Detector loop - // Collect the NN strip hits, if any - + // If there are NN strips, assign them to their appropriate hits if (IncludingNearestNeighbors == true) { AssignNearestNeighbors(Event); } From e0c430e151a0ab61b0d78d631e93f15b614b3ee1 Mon Sep 17 00:00:00 2001 From: Julian Gerber Date: Tue, 28 Jul 2026 14:07:50 -0700 Subject: [PATCH 12/20] Read out NN strip hits into .dat file --- src/MHit.cxx | 3 +++ src/MStripHit.cxx | 41 +++++++++++++++++++++++++++++------------ 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/src/MHit.cxx b/src/MHit.cxx index 99bef17f..bcf97ae3 100644 --- a/src/MHit.cxx +++ b/src/MHit.cxx @@ -211,6 +211,9 @@ bool MHit::StreamDat(ostream& S, int Version) for (auto SH : m_StripHits) { SH->StreamDat(S, 0); } + for (auto SH : m_NearestNeighborStripHits) { + SH->StreamDat(S, 0); + } } else { if (g_Verbosity >= c_Error) cout<<"Error in MHit::StreamDat: Stream version "< Origins) bool MStripHit::StreamDat(ostream& S, int Version) { - //! Stream the content to an ASCII file + //! Stream the content to an ASCII file - S<<"SH " - <GetDetectorID()<<" " - <<((m_ReadOutElement->IsLowVoltageStrip() == true) ? "l" : "h")<<" " - <GetStripID()<<" " - <IsNearestNeighbor() == true) { + S<<"NN " + <GetDetectorID()<<" " + <<((m_ReadOutElement->IsLowVoltageStrip() == true) ? "l" : "h")<<" " + <GetStripID()<<" " + <GetDetectorID()<<" " + <<((m_ReadOutElement->IsLowVoltageStrip() == true) ? "l" : "h")<<" " + <GetStripID()<<" " + < Date: Tue, 28 Jul 2026 14:16:27 -0700 Subject: [PATCH 13/20] Changing how nearest neighbor is referenced --- src/MStripHit.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MStripHit.cxx b/src/MStripHit.cxx index b95ddabc..366fa090 100644 --- a/src/MStripHit.cxx +++ b/src/MStripHit.cxx @@ -163,7 +163,7 @@ bool MStripHit::StreamDat(ostream& S, int Version) { //! Stream the content to an ASCII file - if (m_ReadOutElement->IsNearestNeighbor() == true) { + if (m_IsNearestNeighbor == true) { S<<"NN " <GetDetectorID()<<" " <<((m_ReadOutElement->IsLowVoltageStrip() == true) ? "l" : "h")<<" " From 14330c297931a2c8b15b201e2c37887b559bfc44 Mon Sep 17 00:00:00 2001 From: Julian Gerber Date: Tue, 28 Jul 2026 14:56:55 -0700 Subject: [PATCH 14/20] Adding flag for ambiguous neighbors --- include/MStripHit.h | 5 +++ ...MModuleStripPairingMultiRoundChiSquare.cxx | 31 +++++++++++++++---- src/MStripHit.cxx | 1 + 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/include/MStripHit.h b/include/MStripHit.h index b5ab712d..986e263c 100644 --- a/include/MStripHit.h +++ b/include/MStripHit.h @@ -131,6 +131,11 @@ class MStripHit void IsNearestNeighbor(bool NearestNeighbor) { m_IsNearestNeighbor = NearestNeighbor; } //! Return a boolean indicating whether the strip is a Nearest Neighbor bool IsNearestNeighbor() const { return m_IsNearestNeighbor; } + + //! Set if this is an ambiguous neighbor (ie. associated with multiple hits) + void IsAmbiguousNearestNeighbor(bool AmbiguousNeighbor) { m_IsAmbiguousNeighbor = AmbiguousNeighbor; } + //! Return boolean indicating whether strip is an ambiguous nearest neighbor (default is false for triggered strips) + bool IsAmbiguousNearestNeighbor() const { return m_IsAmbiguousNeighbor; } //! Set the Fast Timing flag void HasFastTiming(bool FastTiming) { m_HasFastTiming = FastTiming; } diff --git a/src/MModuleStripPairingMultiRoundChiSquare.cxx b/src/MModuleStripPairingMultiRoundChiSquare.cxx index 4ab7818d..0b39b154 100644 --- a/src/MModuleStripPairingMultiRoundChiSquare.cxx +++ b/src/MModuleStripPairingMultiRoundChiSquare.cxx @@ -769,6 +769,8 @@ void MModuleStripPairingMultiRoundChiSquare::AssignNearestNeighbors(MReadOutAsse vector>> NNStripHits = CollectNearestNeighborStripHits(Event); // List of detectors, list of sides, list of strip hits + vector AssignedNeighbors; // List of all the assigned NN strip hits, in order to check if NNs are double counted + for (unsigned int h = 0; h < Event->GetNHits(); h++) { vector> StripIDs; // list of sides, list of strips StripIDs.push_back(vector()); // LV @@ -792,20 +794,37 @@ void MModuleStripPairingMultiRoundChiSquare::AssignNearestNeighbors(MReadOutAsse int LeftEdgeHV = *min_element(StripIDs[1].begin(), StripIDs[1].end()); int RightEdgeHV = *max_element(StripIDs[1].begin(), StripIDs[1].end()); - // NOTE: If there are two hits that are one strip hit apart, then the NN strip hit will be added to both hits - // Should there be some flag for the case where it's ambiguous which hit a neighbor should be assigned to? + // If there are two hits that are one strip hit apart, then the NN strip hit will be added to both hits // Define the LV neighbors for (unsigned int sh = 0; sh < NNStripHits[DetectorID][0].size(); sh++) { - if ((NNStripHits[DetectorID][0][sh]->GetStripID() == LeftEdgeLV - 1) or (NNStripHits[DetectorID][0][sh]->GetStripID() == RightEdgeLV + 1)) { - Event->GetHit(h)->AddNearestNeighborStripHit(NNStripHits[DetectorID][0][sh]); + MStripHit* NNSH = NNStripHits[DetectorID][0][sh]; + if ((NNSH->GetStripID() == LeftEdgeLV - 1) or (NNSH->GetStripID() == RightEdgeLV + 1)) { + Event->GetHit(h)->AddNearestNeighborStripHit(NNSH); + // If NN strip hit is not yet assigned to a hit, then add it to the list of assigned neighbors + if (find(AssignedNeighbors.begin(), AssignedNeighbors.end(), NNSH) == AssignedNeighbors.end()) { + AssignedNeighbors.push_back(NNSH); + } + // If it has already been assigned to a hit, then flag that strip hit as an ambiguous nearest neighbor + else { + NNSH->IsAmbiguousNeighbor(true); + } } } // Define the HV neighbors for (unsigned int sh = 0; sh < NNStripHits[DetectorID][1].size(); sh++) { - if ((NNStripHits[DetectorID][1][sh]->GetStripID() == LeftEdgeHV - 1) or (NNStripHits[DetectorID][1][sh]->GetStripID() == RightEdgeHV + 1)) { - Event->GetHit(h)->AddNearestNeighborStripHit(NNStripHits[DetectorID][1][sh]); + MStripHit* NNSH = NNStripHits[DetectorID][1]; + if ((NNSH->GetStripID() == LeftEdgeHV - 1) or (NNSH->GetStripID() == RightEdgeHV + 1)) { + Event->GetHit(h)->AddNearestNeighborStripHit(NNSH); + } + // If NN strip hit is not yet assigned to a hit, then add it to the list of assigned neighbors + if (find(AssignedNeighbors.begin(), AssignedNeighbors.end(), NNSH) == AssignedNeighbors.end()) { + AssignedNeighbors.push_back(NNSH); + } + // If it has already been assigned to a hit, then flag that strip hit as an ambiguous nearest neighbor + else { + NNSH->IsAmbiguousNeighbor(true); } } } diff --git a/src/MStripHit.cxx b/src/MStripHit.cxx index 366fa090..3a88956a 100644 --- a/src/MStripHit.cxx +++ b/src/MStripHit.cxx @@ -89,6 +89,7 @@ void MStripHit::Clear() m_IsGuardRing = false; m_IsNearestNeighbor = false; + m_IsAmbiguousNeighbor = false; m_HasFastTiming = false; m_HasCalibratedTiming = false; From 83a0cc11ec469741d14aed65f9ca279655f9fba1 Mon Sep 17 00:00:00 2001 From: Julian Gerber Date: Tue, 28 Jul 2026 14:58:19 -0700 Subject: [PATCH 15/20] forgot to initialize new variable --- include/MStripHit.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/MStripHit.h b/include/MStripHit.h index 986e263c..07ca6928 100644 --- a/include/MStripHit.h +++ b/include/MStripHit.h @@ -200,6 +200,7 @@ class MStripHit //! Flags denoting the type of strip hit bool m_IsGuardRing; bool m_IsNearestNeighbor; + bool m_IsAmbiguousNeighbor; //! Flag indicating whether the hit has fast timing bool m_HasFastTiming; From b5243d3875c0eefc2f8ac758f29c2d380b7d2332 Mon Sep 17 00:00:00 2001 From: Julian Gerber Date: Tue, 28 Jul 2026 15:02:31 -0700 Subject: [PATCH 16/20] Update variable/function names --- include/MStripHit.h | 6 +++--- src/MModuleStripPairingMultiRoundChiSquare.cxx | 6 +++--- src/MStripHit.cxx | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/MStripHit.h b/include/MStripHit.h index 07ca6928..901ab0a7 100644 --- a/include/MStripHit.h +++ b/include/MStripHit.h @@ -133,9 +133,9 @@ class MStripHit bool IsNearestNeighbor() const { return m_IsNearestNeighbor; } //! Set if this is an ambiguous neighbor (ie. associated with multiple hits) - void IsAmbiguousNearestNeighbor(bool AmbiguousNeighbor) { m_IsAmbiguousNeighbor = AmbiguousNeighbor; } + void IsAmbiguousNearestNeighbor(bool AmbiguousNearestNeighbor) { m_IsAmbiguousNearestNeighbor = AmbiguousNearestNeighbor; } //! Return boolean indicating whether strip is an ambiguous nearest neighbor (default is false for triggered strips) - bool IsAmbiguousNearestNeighbor() const { return m_IsAmbiguousNeighbor; } + bool IsAmbiguousNearestNeighbor() const { return m_IsAmbiguousNearestNeighbor; } //! Set the Fast Timing flag void HasFastTiming(bool FastTiming) { m_HasFastTiming = FastTiming; } @@ -200,7 +200,7 @@ class MStripHit //! Flags denoting the type of strip hit bool m_IsGuardRing; bool m_IsNearestNeighbor; - bool m_IsAmbiguousNeighbor; + bool m_IsAmbiguousNearestNeighbor; //! Flag indicating whether the hit has fast timing bool m_HasFastTiming; diff --git a/src/MModuleStripPairingMultiRoundChiSquare.cxx b/src/MModuleStripPairingMultiRoundChiSquare.cxx index 0b39b154..104ed7ea 100644 --- a/src/MModuleStripPairingMultiRoundChiSquare.cxx +++ b/src/MModuleStripPairingMultiRoundChiSquare.cxx @@ -807,14 +807,14 @@ void MModuleStripPairingMultiRoundChiSquare::AssignNearestNeighbors(MReadOutAsse } // If it has already been assigned to a hit, then flag that strip hit as an ambiguous nearest neighbor else { - NNSH->IsAmbiguousNeighbor(true); + NNSH->IsAmbiguousNearestNeighbor(true); } } } // Define the HV neighbors for (unsigned int sh = 0; sh < NNStripHits[DetectorID][1].size(); sh++) { - MStripHit* NNSH = NNStripHits[DetectorID][1]; + MStripHit* NNSH = NNStripHits[DetectorID][1][sh]; if ((NNSH->GetStripID() == LeftEdgeHV - 1) or (NNSH->GetStripID() == RightEdgeHV + 1)) { Event->GetHit(h)->AddNearestNeighborStripHit(NNSH); } @@ -824,7 +824,7 @@ void MModuleStripPairingMultiRoundChiSquare::AssignNearestNeighbors(MReadOutAsse } // If it has already been assigned to a hit, then flag that strip hit as an ambiguous nearest neighbor else { - NNSH->IsAmbiguousNeighbor(true); + NNSH->IsAmbiguousNearestNeighbor(true); } } } diff --git a/src/MStripHit.cxx b/src/MStripHit.cxx index 3a88956a..dd6a426c 100644 --- a/src/MStripHit.cxx +++ b/src/MStripHit.cxx @@ -89,7 +89,7 @@ void MStripHit::Clear() m_IsGuardRing = false; m_IsNearestNeighbor = false; - m_IsAmbiguousNeighbor = false; + m_IsAmbiguousNearestNeighbor = false; m_HasFastTiming = false; m_HasCalibratedTiming = false; From 25551a485ad0f856ff030c2b3cb5fe5dc0b4d995 Mon Sep 17 00:00:00 2001 From: Julian Gerber Date: Tue, 28 Jul 2026 16:32:25 -0700 Subject: [PATCH 17/20] Edit MStripHit parse function to account for new .dat readout --- src/MStripHit.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MStripHit.cxx b/src/MStripHit.cxx index dd6a426c..a1c67bc2 100644 --- a/src/MStripHit.cxx +++ b/src/MStripHit.cxx @@ -108,8 +108,8 @@ bool MStripHit::Parse(MString& Line, int Version) if (g_Verbosity >= c_Error) cout<<"Error in MStripHit::Parse: line too short"< Date: Wed, 5 Aug 2026 14:34:11 -0700 Subject: [PATCH 18/20] Revert "Merge remote-tracking branch 'carolyn/qa_option'" This reverts commit 9f7b81318957fc8d8d7c338000a5e1af7c961673, reversing changes made to 2879859447d4a1975da0f8b76e6af9f0189af928. --- include/MGUIOptionsEventSaver.h | 3 --- include/MModuleEventSaver.h | 8 -------- include/MReadOutAssembly.h | 2 -- src/MGUIOptionsEventSaver.cxx | 5 ----- src/MModuleEventSaver.cxx | 10 ---------- src/MReadOutAssembly.cxx | 25 +------------------------ 6 files changed, 1 insertion(+), 52 deletions(-) diff --git a/include/MGUIOptionsEventSaver.h b/include/MGUIOptionsEventSaver.h index a6f79050..fe466302 100644 --- a/include/MGUIOptionsEventSaver.h +++ b/include/MGUIOptionsEventSaver.h @@ -81,9 +81,6 @@ class MGUIOptionsEventSaver : public MGUIOptions //! Checkbutton to save or reject bad events TGCheckButton* m_SaveBadEvents; - //! Checkbutton to save or reject quality flag events - TGCheckButton* m_SavePoorQualityEvents; - //! Checkbutton to save veto events TGCheckButton* m_SaveVetoEvents; diff --git a/include/MModuleEventSaver.h b/include/MModuleEventSaver.h index 44064268..e3f1d952 100644 --- a/include/MModuleEventSaver.h +++ b/include/MModuleEventSaver.h @@ -63,11 +63,6 @@ class MModuleEventSaver : public MModule //! Set whether the Bad events should be saved void SetSaveBadEvents(bool SaveBadEvents) { m_SaveBadEvents = SaveBadEvents; } - //! Return true if the Poor Quality events should be saved - bool GetSavePoorQualityEvents() const { return m_SavePoorQualityEvents; } - //! Set whether the Poor Quality events should be saved - void SetSavePoorQualityEvents(bool SavePoorQualityEvents) { m_SavePoorQualityEvents = SavePoorQualityEvents; } - //! Return true if the Veto events should be saved bool GetSaveVetoEvents() const { return m_SaveVetoEvents; } //! Set whether the Veto events should be saved @@ -198,9 +193,6 @@ class MModuleEventSaver : public MModule //! Save bad events bool m_SaveBadEvents; - //! Save poor quality events - bool m_SavePoorQualityEvents; - //! Save Veto events bool m_SaveVetoEvents; diff --git a/include/MReadOutAssembly.h b/include/MReadOutAssembly.h index 91002736..e0e63765 100644 --- a/include/MReadOutAssembly.h +++ b/include/MReadOutAssembly.h @@ -260,8 +260,6 @@ class MReadOutAssembly : public MReadOutSequence //! Return true if any error flag is set or the event has been filtered out //! Veto and quality flags do not affect this result bool IsBad() const; - //! Returns true if any of the Quality flags have been set - bool IsPoorQuality() const; //! Set a specific analysis progress void SetAnalysisProgress(uint64_t Progress) { m_AnalysisProgress |= Progress; } diff --git a/src/MGUIOptionsEventSaver.cxx b/src/MGUIOptionsEventSaver.cxx index 20328f33..ab913a43 100644 --- a/src/MGUIOptionsEventSaver.cxx +++ b/src/MGUIOptionsEventSaver.cxx @@ -108,10 +108,6 @@ void MGUIOptionsEventSaver::Create() m_SaveBadEvents->SetOn(dynamic_cast(m_Module)->GetSaveBadEvents()); GeneralFrame->AddFrame(m_SaveBadEvents, FirstLabelLayout); - m_SavePoorQualityEvents = new TGCheckButton(GeneralFrame, "Save events with quality flag (QA)", 1); - m_SavePoorQualityEvents->SetOn(dynamic_cast(m_Module)->GetSavePoorQualityEvents()); - GeneralFrame->AddFrame(m_SavePoorQualityEvents, TightButtonLayout); - m_SaveVetoEvents = new TGCheckButton(GeneralFrame, "Save guard ring and shield veto events (Veto)", 1); m_SaveVetoEvents->SetOn(dynamic_cast(m_Module)->GetSaveVetoEvents()); GeneralFrame->AddFrame(m_SaveVetoEvents, TightButtonLayout); @@ -233,7 +229,6 @@ bool MGUIOptionsEventSaver::OnApply() dynamic_cast(m_Module)->SetFileName(m_FileSelector->GetFileName()); dynamic_cast(m_Module)->SetSaveBadEvents(m_SaveBadEvents->IsOn()); - dynamic_cast(m_Module)->SetSavePoorQualityEvents(m_SavePoorQualityEvents->IsOn()); dynamic_cast(m_Module)->SetSaveVetoEvents(m_SaveVetoEvents->IsOn()); dynamic_cast(m_Module)->SetAddTimeTag(m_AddTimeTag->IsOn()); dynamic_cast(m_Module)->SetSplitFile(m_SplitFile->IsOn()); diff --git a/src/MModuleEventSaver.cxx b/src/MModuleEventSaver.cxx index c1ff7e08..dc7671c3 100644 --- a/src/MModuleEventSaver.cxx +++ b/src/MModuleEventSaver.cxx @@ -75,7 +75,6 @@ MModuleEventSaver::MModuleEventSaver() : MModule() m_InternalFileName = ""; m_Zip = false; m_SaveBadEvents = true; - m_SavePoorQualityEvents = true; m_SaveVetoEvents = true; m_AddTimeTag = false; @@ -346,10 +345,6 @@ bool MModuleEventSaver::AnalyzeEvent(MReadOutAssembly* Event) if (Event->IsBad() == true) return true; } - if (m_SavePoorQualityEvents == false) { - if (Event->IsPoorQuality() == true) return true; - } - if (m_SaveVetoEvents == false) { if (Event->IsVeto() == true) return true; } @@ -420,10 +415,6 @@ bool MModuleEventSaver::ReadXmlConfiguration(MXmlNode* Node) if (SaveBadEventsNode != 0) { m_SaveBadEvents = SaveBadEventsNode->GetValueAsBoolean(); } - MXmlNode* SavePoorQualityEventsNode = Node->GetNode("SavePoorQualityEvents"); - if (SavePoorQualityEventsNode != 0) { - m_SavePoorQualityEvents = SavePoorQualityEventsNode->GetValueAsBoolean(); - } MXmlNode* SaveVetoEventsNode = Node->GetNode("SaveVetoEvents"); if (SaveVetoEventsNode != 0) { m_SaveVetoEvents = SaveVetoEventsNode->GetValueAsBoolean(); @@ -489,7 +480,6 @@ MXmlNode* MModuleEventSaver::CreateXmlConfiguration() new MXmlNode(Node, "FileName", m_FileName); new MXmlNode(Node, "Mode", m_Mode); new MXmlNode(Node, "SaveBadEvents", m_SaveBadEvents); - new MXmlNode(Node, "SavePoorQualityEvents", m_SavePoorQualityEvents); new MXmlNode(Node, "SaveVetoEvents", m_SaveVetoEvents); new MXmlNode(Node, "AddTimeTag", m_AddTimeTag); new MXmlNode(Node, "SplitFile", m_SplitFile); diff --git a/src/MReadOutAssembly.cxx b/src/MReadOutAssembly.cxx index 7294f427..28cec5af 100644 --- a/src/MReadOutAssembly.cxx +++ b/src/MReadOutAssembly.cxx @@ -632,13 +632,7 @@ void MReadOutAssembly::StreamEvta(ostream& S) } for (unsigned int h = 0; h < m_Hits.size(); ++h) { - // Don't print Guard Ring hits as normal strip hits as they don't have positions defined - // the corresponding energy is saved in the StripPairing QA message - if (m_Hits[h]->GetGuardRingHitFlag() == true) { - continue; - } else { - m_Hits[h]->StreamEvta(S); - } + m_Hits[h]->StreamEvta(S); } S<<"CC NStripHits "< Date: Wed, 5 Aug 2026 15:00:51 -0700 Subject: [PATCH 19/20] Fixing bugs from merge --- include/MStripHit.h | 5 ++++- src/MStripHit.cxx | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/MStripHit.h b/include/MStripHit.h index a892f8e9..36952849 100644 --- a/include/MStripHit.h +++ b/include/MStripHit.h @@ -210,9 +210,12 @@ class MStripHit bool m_IsGuardRing; //! True if the hit is a nearest neighbor hit bool m_IsNearestNeighbor; + //! True if the strip has triggered + bool m_HasTriggered; + //! True if the nearest neighbor strip hit is associated with multiple strip paired hits bool m_IsAmbiguousNearestNeighbor; - //! Flag indicating whether the hit has fast timing + //! True if the hit has fast timing bool m_HasFastTiming; //! True if the hit has calibrated timing bool m_HasCalibratedTiming; diff --git a/src/MStripHit.cxx b/src/MStripHit.cxx index 30f25e7f..c378d192 100644 --- a/src/MStripHit.cxx +++ b/src/MStripHit.cxx @@ -174,7 +174,6 @@ bool MStripHit::StreamDat(ostream& S, int Version) <GetStripID()<<" " <GetStripID()<<" " < Date: Wed, 5 Aug 2026 15:02:27 -0700 Subject: [PATCH 20/20] Editing error message in MStripHit Parse --- src/MStripHit.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MStripHit.cxx b/src/MStripHit.cxx index c378d192..cec82b01 100644 --- a/src/MStripHit.cxx +++ b/src/MStripHit.cxx @@ -141,7 +141,7 @@ bool MStripHit::Parse(const MString& Line, int Version) ParseFlags(flags); return true; } else { - if (g_Verbosity >= c_Error) cout<<"Error in MStripHit::Parse: line starts with '"<= c_Error) cout<<"Error in MStripHit::Parse: line starts with '"<