Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ void sbn::ICARUSBNBRetriever::produce(art::Event& e)
// Keep track of the number of beam gates the DAQ thinks
// are in this job
TotalBeamSpills += triggerInfo.number_of_gates_since_previous_event;
sbn::pot::MWRdata_t const MWRdata = extractSpillTimes(triggerInfo, bfp, bfp_mwr, fTimePad, MWRtoroidDelay, mwrdata);
sbn::pot::MWRdata_t const MWRdata = extractSpillTimes(triggerInfo, bfp, bfp_mwr, vp873, offsets, fTimePad, MWRtoroidDelay, mwrdata);

int const spill_count = matchMultiWireData(e.id(), triggerInfo, MWRdata, fOutbeamInfos);

if(spill_count > int(triggerInfo.number_of_gates_since_previous_event))
Expand Down
9 changes: 8 additions & 1 deletion sbncode/BeamSpillInfoRetriever/POTTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,20 @@ namespace sbn::pot{
}
}

sbn::pot::MWRdata_t extractSpillTimes(TriggerInfo_t const& triggerInfo, std::unique_ptr<ifbeam_ns::BeamFolder> const& bfp, std::unique_ptr<ifbeam_ns::BeamFolder> const& bfp_mwr, double fTimePad, double MWRtoroidDelay, sbn::MWRData mwrdata) {
sbn::pot::MWRdata_t extractSpillTimes(TriggerInfo_t const& triggerInfo, std::unique_ptr<ifbeam_ns::BeamFolder> const& bfp, std::unique_ptr<ifbeam_ns::BeamFolder> const& bfp_mwr, std::unique_ptr<ifbeam_ns::BeamFolder> const& vp873, std::unique_ptr<ifbeam_ns::BeamFolder> const& offsets, double fTimePad, double MWRtoroidDelay, sbn::MWRData mwrdata) {

// These lines get everything primed within the IFBeamDB.
try{bfp->FillCache((triggerInfo.t_current_event)+fTimePad);} catch (WebAPIException &we) {};
try{bfp->FillCache((triggerInfo.t_previous_event)-fTimePad);} catch (WebAPIException &we) {};
try{bfp_mwr->FillCache((triggerInfo.t_current_event)+fTimePad);} catch (WebAPIException &we) {};
try{bfp_mwr->FillCache((triggerInfo.t_previous_event)-fTimePad);} catch (WebAPIException &we) {};

// Added Oct 30 by N. Rowe
try{vp873->FillCache((triggerInfo.t_current_event)+fTimePad);} catch (WebAPIException &we) {};
try{vp873->FillCache((triggerInfo.t_previous_event)-fTimePad);} catch (WebAPIException &we) {};
try{offsets->FillCache((triggerInfo.t_current_event)+fTimePad);} catch (WebAPIException &we) {};
try{offsets->FillCache((triggerInfo.t_previous_event)-fTimePad);} catch (WebAPIException &we) {};


// The multiwire chambers provide their
// data in a vector format but we'll have
Expand Down
2 changes: 1 addition & 1 deletion sbncode/BeamSpillInfoRetriever/POTTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace sbn::pot{
* @param MWRtoroidDelay Delay between MWR and toroids
* @param mwrdata MWRData to unpack
*/
MWRdata_t extractSpillTimes(TriggerInfo_t const& triggerInfo, std::unique_ptr<ifbeam_ns::BeamFolder> const& bfp, std::unique_ptr<ifbeam_ns::BeamFolder> const& bfp_mwr, double fTimePad, double MWRtoroidDelay, sbn::MWRData mwrdata );
MWRdata_t extractSpillTimes(TriggerInfo_t const& triggerInfo, std::unique_ptr<ifbeam_ns::BeamFolder> const& bfp, std::unique_ptr<ifbeam_ns::BeamFolder> const& bfp_mwr, std::unique_ptr<ifbeam_ns::BeamFolder> const& offsets, std::unique_ptr<ifbeam_ns::BeamFolder> const& vp873, double fTimePad, double MWRtoroidDelay, sbn::MWRData mwrdata );
/**
* @brief Compile spill information into BNBSpillInfo object
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void sbn::SBNDBNBRetriever::produce(art::Event & e)
}

TotalBeamSpills += triggerInfo.number_of_gates_since_previous_event;
sbn::pot::MWRdata_t const MWRdata = extractSpillTimes(triggerInfo, bfp, bfp_mwr, fTimePad, MWRtoroidDelay, mwrdata);
sbn::pot::MWRdata_t const MWRdata = extractSpillTimes(triggerInfo, bfp, bfp_mwr, vp873, offsets, fTimePad, MWRtoroidDelay, mwrdata);

int const spill_count = matchMultiWireData(e.id(), triggerInfo, MWRdata, fOutbeamInfos);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ void sbn::SBNDBNBZEROBIASRetriever::produce(art::Event & e)
e.put(std::move(p));
return;
}

TotalBeamSpills += triggerInfo.number_of_gates_since_previous_event;
sbn::pot::MWRdata_t const MWRdata = extractSpillTimes(triggerInfo, bfp, bfp_mwr, fTimePad, MWRtoroidDelay, mwrdata);
sbn::pot::MWRdata_t const MWRdata = extractSpillTimes(triggerInfo, bfp, bfp_mwr, vp873, offsets, fTimePad, MWRtoroidDelay, mwrdata);

matchMultiWireData(e.id(), triggerInfo, MWRdata, fOutbeamInfos);
fOutbeamInfosTotal.insert(fOutbeamInfosTotal.end(),fOutbeamInfos.begin(),fOutbeamInfos.end());
Expand Down