|
115 | 115 | #include "sbnobj/Common/POTAccounting/BNBSpillInfo.h" |
116 | 116 | #include "sbnobj/Common/POTAccounting/EXTCountInfo.h" |
117 | 117 | #include "sbnobj/Common/POTAccounting/NuMISpillInfo.h" |
| 118 | +#include "sbncode/BeamSpillInfoRetriever/POTTools.h" |
| 119 | +#include "artdaq-core/Data/ContainerFragment.hh" |
118 | 120 | #include "sbnobj/Common/Trigger/ExtraTriggerInfo.h" |
119 | 121 | #include "sbnobj/Common/Reco/CRUMBSResult.h" |
120 | 122 | #include "sbnobj/Common/Reco/OpT0FinderResult.h" |
@@ -1711,6 +1713,23 @@ void CAFMaker::produce(art::Event& evt) noexcept { |
1711 | 1713 | FillTriggerEmulation(monpulses_handle, monpulse_sizes_handle, pairs_handle, trigemu_handle, srtrigger); |
1712 | 1714 | } |
1713 | 1715 |
|
| 1716 | + |
| 1717 | + // Fill PTB (Penn Trigger Board) information for SBND real data |
| 1718 | + if (isRealData && fDet == kSBND) { |
| 1719 | + art::InputTag PTB_itag("daq", "ContainerPTB"); |
| 1720 | + art::Handle<artdaq::Fragments> ptb_frags_handle; |
| 1721 | + evt.getByLabel(PTB_itag, ptb_frags_handle); |
| 1722 | + if (ptb_frags_handle.isValid()) { |
| 1723 | + try { |
| 1724 | + std::vector<sbn::pot::PTBInfo_t> ptb_triggers = sbn::pot::extractAllPTBInfo(ptb_frags_handle); |
| 1725 | + FillPTBTriggersSBND(ptb_triggers, srtrigger); |
| 1726 | + } |
| 1727 | + catch (...) { |
| 1728 | + std::cout << "CAFMaker: Failed to extract PTB triggers" << std::endl; |
| 1729 | + } |
| 1730 | + } |
| 1731 | + } |
| 1732 | + |
1714 | 1733 | // If not real data, fill in enough of the SRTrigger to make (e.g.) the CRT |
1715 | 1734 | // time referencing work. TODO: add more stuff to a "MC"-Trigger? |
1716 | 1735 | // No longer needed with incorporation of trigger emulation in the MC. |
|
0 commit comments