Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
af177fc
Remove nearest neighbor hack
parshadkp Jun 29, 2026
dc94c0d
Merge branch 'develop/em' into NN_strip_fix
parshadkp Aug 4, 2026
8aef671
Add `m_IsNearestNeighbor` to `MDEEStripHit`
fhagemann Aug 10, 2026
0b16751
Add `m_HardwareThresholdMap` to `MModuleEnergyCalibration`
fhagemann Aug 10, 2026
8f702cc
Add hardware threshold to `MSubModuleDEEStripReadout`
fhagemann Aug 10, 2026
77cd6fe
Sort the `MDEEStripHits` by strip number in `MSubModuleDEEOutput`
fhagemann Aug 11, 2026
0f93704
Cap timing resolution in `MSubModuleDepthReadout` to maximum 50ns
fhagemann Aug 11, 2026
08e53b9
Apply dummy fast threshold in `MSubModuleDepthReadout`
fhagemann Aug 11, 2026
c7c1662
Remove sub-threshold `MDEEStripHits` without triggering neighbor and …
fhagemann Aug 11, 2026
8100537
Add dummy ecal file to `resource/dee`
fhagemann Aug 12, 2026
f6d323f
Add dummy hardware thresholds file to `resource/dee`
fhagemann Aug 12, 2026
ad70275
Merge remote-tracking branch 'upstream/pr-190' into NN_strip_fix
parshadkp Aug 18, 2026
e903a4d
Merge branch 'develop/em' into NN_strip_fix
parshadkp Aug 24, 2026
0a0bcc3
Revert "Merge remote-tracking branch 'upstream/pr-190' into NN_strip_…
parshadkp Aug 24, 2026
6006d76
Merge branch 'NN_strip_fix' of github.com:parshadkp/nuclearizer_parsh…
parshadkp Aug 24, 2026
798a408
Revert "Merge branch 'NN_strip_fix' of github.com:parshadkp/nucleariz…
parshadkp Aug 24, 2026
fb3c3cd
Reapply "Merge branch 'NN_strip_fix' of github.com:parshadkp/nucleari…
parshadkp Aug 24, 2026
05bd129
Restore develop/em files after merge revert
parshadkp Aug 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions include/MSubModuleStripTrigger.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ class MSubModuleStripTrigger : public MSubModule
//! Process strip hits for deadtime and trigger determination
bool ProcessStripHits(MReadOutAssembly* Event);

//! Helper function for getting count rate (including nearest neighbor)
bool CountRate(vector<int> ASICChannels, vector<double> CountTime);
Comment thread
fhagemann marked this conversation as resolved.

//! Check if at least one strip exists on each side of each detector
bool CheckTriggerConditions(MReadOutAssembly* Event);

Expand Down Expand Up @@ -209,11 +206,6 @@ class MSubModuleStripTrigger : public MSubModule
//! Stores trigger counts for each detector
vector<int> m_NumStripTriggers;

//! Event strip times for counting (should be removed later)
vector<double> m_EventStripTimes;
//! Event strip IDs for counting (should be removed later)
vector<double> m_EventStripIDs;

#ifdef ___CLING___
public:
ClassDef(MSubModuleStripTrigger, 0) // no description
Expand Down
79 changes: 2 additions & 77 deletions src/MSubModuleStripTrigger.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "MSubModuleStripTrigger.h"

// Standard libs:
#include <algorithm>
#include <limits>

// ROOT libs:
Expand Down Expand Up @@ -148,7 +147,7 @@ void MSubModuleStripTrigger::ApplyFastClearDeadtime(const MTime& ShieldVetoTime)

double MSubModuleStripTrigger::CalculateASICDeadtime(vector<int> ASICChannels)
{
// Calculate deadtime for GeD ASICs including nearest neighbor readout
// Calculate deadtime for GeD ASICs from the unique channels that were read out (including nearest neighbor)

double deadtime = 0; // temporary deadtime variable
int countUnique = 0; // temporary unique channel counter
Expand All @@ -159,27 +158,8 @@ double MSubModuleStripTrigger::CalculateASICDeadtime(vector<int> ASICChannels)

unordered_set<int> ASICChannelsSet;

// Sort ASICChannels to process channels in ascending order
sort(ASICChannels.begin(), ASICChannels.end());

// Loop through each channel ID and add nearest neighbors
for (int ID : ASICChannels) {
if (ID == 64) {
ASICChannelsSet.insert(ID);
} else if (ID == 0 || ID == 32) {
// Edge case: If ID is 0 or 32, add the channel and the next channel
ASICChannelsSet.insert(ID);
ASICChannelsSet.insert(ID + 1);
} else if (ID == 31 || ID == 63) {
// Edge case: If ID is 31 or 63, add the previous channel and the channel itself
ASICChannelsSet.insert(ID - 1);
ASICChannelsSet.insert(ID);
} else {
// General case: Add the previous channel, the channel itself, and the next channel
ASICChannelsSet.insert(ID - 1);
ASICChannelsSet.insert(ID);
ASICChannelsSet.insert(ID + 1);
}
ASICChannelsSet.insert(ID);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That's much easier :)

}

// Count the number of unique channels read out
Expand All @@ -195,60 +175,6 @@ double MSubModuleStripTrigger::CalculateASICDeadtime(vector<int> ASICChannels)
////////////////////////////////////////////////////////////////////////////////


bool MSubModuleStripTrigger::CountRate(vector<int> ASICChannels, vector<double> CountTime)
{
// Helper function for getting count rate (including nearest neighbor)

if (ASICChannels.empty()) {
return false;
}

unordered_set<int> ASICChannelsSet;
vector<double> CountTimeVec;

// Sort ASICChannels to process channels in ascending order
sort(ASICChannels.begin(), ASICChannels.end());

// Loop through each channel ID
for (size_t i = 0; i < ASICChannels.size(); i++) {
int ID = ASICChannels[i];
size_t temp_size = ASICChannelsSet.size();

if (ID == 64) {
// ASICChannelsSet.insert(ID);
continue; // Do not include GR hits in count rate calculation as it has its own readout and does not cause nearest neighbor readout
} else if (ID == 0 || ID == 32) {
ASICChannelsSet.insert(ID);
ASICChannelsSet.insert(ID + 1);
} else if (ID == 31 || ID == 63) {
ASICChannelsSet.insert(ID - 1);
ASICChannelsSet.insert(ID);
} else {
ASICChannelsSet.insert(ID - 1);
ASICChannelsSet.insert(ID);
ASICChannelsSet.insert(ID + 1);
}

size_t new_size = ASICChannelsSet.size();
for (size_t j = 0; j < (new_size - temp_size); j++) {
CountTimeVec.push_back(CountTime[i]);
}
}

int h = 0;
for (int k : ASICChannelsSet) {
m_EventStripIDs.push_back(k);
m_EventStripTimes.push_back(CountTimeVec[h]);
h++;
}

return true;
}


////////////////////////////////////////////////////////////////////////////////


bool MSubModuleStripTrigger::CheckTriggerConditions(MReadOutAssembly* Event)
{
// Check if at least one strip exists on each side of each detector
Expand Down Expand Up @@ -368,7 +294,6 @@ bool MSubModuleStripTrigger::ProcessStripHits(MReadOutAssembly* Event)
if (!ASICFirstHitAfterDead) {
for (int d = 0; d < nDets; d++) {
for (int a = 0; a < nASICs; a++) {
CountRate(m_ASICHitStripID[d][a], m_TempEvtTimes[d][a]);
m_ASICHitStripID_noDT[d][a].clear();
m_ASICHitStripID[d][a].clear();
m_TempEvtTimes[d][a].clear();
Expand Down
Loading