Skip to content

Commit

Permalink
Muon bit seems to be 0x80
Browse files Browse the repository at this point in the history
  • Loading branch information
sfegan committed Oct 8, 2024
1 parent 8d0a2ea commit 12d62a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/iact_data/acada_event_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ decode_cdts_data(calin::ix::iact_data::telescope_event::CDTSData* calin_cdts_dat
calin_cdts_data->set_pedestal_trigger(cdts_data->trigger_type & 0x20);
calin_cdts_data->set_slow_control_trigger(cdts_data->trigger_type & 0x40);
calin_cdts_data->set_local_trigger(cdts_data->trigger_type & 0x80);
calin_cdts_data->set_muon_candidate(cdts_data->stereo_pattern & 0x40);
calin_cdts_data->set_busy_trigger(cdts_data->stereo_pattern & 0x80);
calin_cdts_data->set_muon_candidate(cdts_data->stereo_pattern & 0x80);
// calin_cdts_data->set_busy_trigger(cdts_data->stereo_pattern & 0x80);
} else if(cta_cdts_data.size() == sizeof(CDTSMessageData_V2)) {
const auto* cdts_data =
reinterpret_cast<const CDTSMessageData_V2*>(&cta_cdts_data.front());
Expand Down Expand Up @@ -355,8 +355,8 @@ decode_cdts_data(calin::ix::iact_data::telescope_event::CDTSData* calin_cdts_dat
calin_cdts_data->set_pedestal_trigger(cdts_data->trigger_type & 0x20);
calin_cdts_data->set_slow_control_trigger(cdts_data->trigger_type & 0x40);
calin_cdts_data->set_local_trigger(cdts_data->trigger_type & 0x80);
calin_cdts_data->set_muon_candidate(cdts_data->stereo_pattern & 0x40);
calin_cdts_data->set_busy_trigger(cdts_data->stereo_pattern & 0x80);
calin_cdts_data->set_muon_candidate(cdts_data->stereo_pattern & 0x80);
// calin_cdts_data->set_busy_trigger(cdts_data->stereo_pattern & 0x80);
} else if(cta_cdts_data.size() == sizeof(CDTSMessageData_V1)) {
const auto* cdts_data =
reinterpret_cast<const CDTSMessageData_V1*>(&cta_cdts_data.front());
Expand Down Expand Up @@ -463,7 +463,7 @@ decode_tib_data(calin::ix::iact_data::telescope_event::TIBData* calin_tib_data,
calin_tib_data->set_pps_counter(tib_data->pps_counter);
calin_tib_data->set_clock_counter(tib_data->clock_counter_lo16
+ (tib_data->clock_counter_hi8<<16) );
calin_tib_data->set_stereo_pattern(tib_data->stereo_pattern&0x0001FFFF);
calin_tib_data->set_stereo_pattern(tib_data->stereo_pattern&0x1FF);
calin_tib_data->set_trigger_type(tib_data->trigger_type);
calin_tib_data->set_spare_bits(tib_data->stereo_pattern>>9);

Expand Down
3 changes: 3 additions & 0 deletions src/iact_data/nectarcam_acada_event_decoder_r1v0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,9 @@ bool NectarCam_ACADACameraEventDecoder_R1v0::decode(
calin_clock->set_time_value(cdts.pps_counter()*10000000ULL + cdts.clock_counter());
calin_clock->set_time_sequence_id(0);
calin_clock->set_time_value_may_be_suspect(clock_may_be_suspect);

calin_event->set_is_muon_candidate(calin_event->is_muon_candidate()
|| cdts.muon_candidate());
} else {
calin_event->add_camera_clock_index(-1);
calin_event->add_camera_clock_index(-1);
Expand Down

0 comments on commit 12d62a4

Please sign in to comment.