Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 27 additions & 0 deletions sbnanaobj/StandardRecord/SRSoftwareTrigger.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* @file /sbnanaobj/StandardRecord/SRSoftwareTrigger.h
* @brief Defines CAF data structures to store sbnd::trigger::pmtSoftwareTrigger objects (header).
* @author Lynn Tung
* @date November 12, 2025
*
*/

#ifndef SRSOFTWARETRIGGER_H
#define SRSOFTWARETRIGGER_H

#include "sbnanaobj/StandardRecord/SRConstants.h"

namespace caf{

/**
* @brief A struct to store software trigger information for SBND Data and MC
*/

struct SRSoftwareTrigger {
int npmts = caf::kUninitializedInt;
float flash_peaktime = caf::kSignalingNaN;
float flash_peakpe = caf::kSignalingNaN;
Comment on lines +21 to +23
Copy link
Member

Choose a reason for hiding this comment

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

Place a comment explaining units and details. For example:

Suggested change
int npmts = caf::kUninitializedInt;
float flash_peaktime = caf::kSignalingNaN;
float flash_peakpe = caf::kSignalingNaN;
int npmts = caf::kUninitializedInt; ///< Number of PMT pairs above threshold at trigger time.
float flash_peaktime = caf::kSignalingNaN; ///< Peak time of the reconstructed flash associated to the trigger [us]
float flash_peakpe = caf::kSignalingNaN; ///< Peak amplitude of the reconstructed flash associated to the trigger, in photoelectron units.

I don't know if these descriptions are correct (that's why some should be there! 😄).
Exception: the time unit can be omitted if it is the standard CAF one (microseconds). However, given that sometimes trigger-related times are specified in nanoseconds, it's still worth to be explicit.

};
}

#endif
3 changes: 2 additions & 1 deletion sbnanaobj/StandardRecord/StandardRecord.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "sbnanaobj/StandardRecord/SRFakeReco.h"
#include "sbnanaobj/StandardRecord/SROpFlash.h"
#include "sbnanaobj/StandardRecord/SRTrigger.h"
#include "sbnanaobj/StandardRecord/SRSoftwareTrigger.h"
#include "sbnanaobj/StandardRecord/SRInteractionDLP.h"
#include "sbnanaobj/StandardRecord/SRInteractionTruthDLP.h"

Expand Down Expand Up @@ -66,7 +67,7 @@ namespace caf
bool pass_flashtrig = false; ///< Whether this Record passed the Flash Trigger requirement
SRSBNDFrameShiftInfo sbnd_frames; ///< List of Frame Shift in event in unit [ns] (SBND)
SRSBNDTimingInfo sbnd_timings; ///< List of Timing Info in event in UNIX timestamp format(SBND)

SRSoftwareTrigger soft_trig; ///< Software Trigger Info in event
int ndlp = 0; ///< Number of reco DLP (ML) interactions.
std::vector<SRInteractionDLP> dlp; ///< Reco DLP (ML) interactions.
int ndlp_true = 0; ///< Number of true DLP (ML) interactions.
Expand Down
8 changes: 6 additions & 2 deletions sbnanaobj/StandardRecord/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
<!-- art::Wrappers for these products are defined in CAFMaker -->

<lcgdict>
<class name="caf::StandardRecord" ClassVersion="15">
<version ClassVersion="15" checksum="1805006132"/>
<class name="caf::StandardRecord" ClassVersion="17">
<version ClassVersion="17" checksum="3621177915"/>
<version ClassVersion="16" checksum="3162654488"/>
<version ClassVersion="15" checksum="2636549707"/>
Comment on lines +8 to +11
Copy link
Member

Choose a reason for hiding this comment

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

Please regenerate this file.
Version 15 has its hash changed, which is not correct.

<version ClassVersion="14" checksum="1860171062"/>
<version ClassVersion="13" checksum="1979816256"/>
<version ClassVersion="12" checksum="3984422068"/>
Expand Down Expand Up @@ -439,6 +441,8 @@
<version ClassVersion="10" checksum="4144120809"/>
</class>

<class name="caf::SRSoftwareTrigger" />
Copy link
Member

Choose a reason for hiding this comment

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

Add ClassVersion="10" and rebuild, so that ROOT generates a checksum.

Suggested change
<class name="caf::SRSoftwareTrigger" />
<class name="caf::SRSoftwareTrigger" ClassVersion="10" />


<enum name="caf::Det_t" ClassVersion="10"/>
<enum name="caf::Plane_t" ClassVersion="10"/>
<enum name="caf::Wall_t" ClassVersion="10"/>
Expand Down