Skip to content

Commit

Permalink
Add per channel count of triggered channel in muon candidates
Browse files Browse the repository at this point in the history
  • Loading branch information
sfegan committed Oct 8, 2024
1 parent 04c31a0 commit fde3875
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
15 changes: 10 additions & 5 deletions proto/diagnostics/simple_charge_stats.proto
Original file line number Diff line number Diff line change
Expand Up @@ -225,19 +225,21 @@ message SimpleChargeStats {
(CFO).desc = "Number of events for which the trigger bit is set for each channel "
"in physics events where the nearest-neighbor trigger is seemingly not "
"satisfied." ];
calin.ix.math.histogram.Histogram1DData num_channel_triggered_hist = 32 [
repeated int64 muon_candidate_channel_triggered_count = 32 [
(CFO).desc = "Number of events for which the trigger bit is set for each channel." ];
calin.ix.math.histogram.Histogram1DData num_channel_triggered_hist = 33 [
(CFO).desc = "Histogram of number of channels triggered.",
(CFO).units = "channels (bin-units), events (weight-units)" ];
calin.ix.math.histogram.Histogram1DData num_contiguous_channel_triggered_hist = 33 [
calin.ix.math.histogram.Histogram1DData num_contiguous_channel_triggered_hist = 34 [
(CFO).desc = "Histogram of number of channels triggered.",
(CFO).units = "channels (bin-units), events (weight-units)" ];
calin.ix.math.histogram.Histogram1DData phy_trigger_num_channel_triggered_hist = 34 [
calin.ix.math.histogram.Histogram1DData phy_trigger_num_channel_triggered_hist = 35 [
(CFO).desc = "Histogram of number of channels triggered in physics events.",
(CFO).units = "channels (bin-units), events (weight-units)" ];
calin.ix.math.histogram.Histogram1DData phy_trigger_num_contiguous_channel_triggered_hist = 35 [
calin.ix.math.histogram.Histogram1DData phy_trigger_num_contiguous_channel_triggered_hist = 36 [
(CFO).desc = "Histogram of number of channels triggered in physics events.",
(CFO).units = "channels (bin-units), events (weight-units)" ];
calin.ix.math.histogram.Histogram1DData muon_candidate_num_channel_triggered_hist = 36 [
calin.ix.math.histogram.Histogram1DData muon_candidate_num_channel_triggered_hist = 37 [
(CFO).desc = "Histogram of number of channels triggered in muon-candidate events.",
(CFO).units = "channels (bin-units), events (weight-units)" ];
};
Expand Down Expand Up @@ -378,6 +380,9 @@ message PartialChannelSimpleChargeStats {
"in physics events where the nearest-neighbor trigger is seemingly not "
"satisfied.",
(CFO).is_counter=true ];
int64 muon_candidate_num_events_triggered = 22 [
(CFO).desc = "Number of events where channel has trigger bit set.",
(CFO).is_counter=true ];
};

message PartialOneGainCameraSimpleChargeStats {
Expand Down
3 changes: 3 additions & 0 deletions src/diagnostics/simple_charge_stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ bool SimpleChargeStatsParallelEventVisitor::leave_telescope_run(
}
if(partials_.camera().num_event_trigger_hitmap_found() > 0) {
results_.add_channel_triggered_count(partials_chan.all_trig_num_events_triggered());
results_.add_muon_candidate_channel_triggered_count(partials_chan.muon_candidate_num_events_triggered());
results_.add_phy_trigger_few_neighbor_channel_triggered_count(partials_chan.phy_trig_few_neighbor_channel_triggered_count());
}
}
Expand Down Expand Up @@ -758,6 +759,8 @@ bool SimpleChargeStatsParallelEventVisitor::visit_telescope_event(uint64_t seq_i
}
for(auto ichan : event->trigger_map().hit_channel_id()) {
partials_.mutable_channel(ichan)->increment_all_trig_num_events_triggered();
partials_.mutable_channel(ichan)->increment_muon_candidate_num_events_triggered(
event->is_muon_candidate());
}
camera_hists_->num_channel_triggered_hist->insert(event->trigger_map().hit_channel_id_size());
int num_contiguous_channel_triggered = 0;
Expand Down

0 comments on commit fde3875

Please sign in to comment.