File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ namespace caf
183183 void FillICARUSOpFlash (const recob::OpFlash &flash,
184184 std::vector<recob::OpHit const *> const & hits,
185185 int cryo,
186+ std::vector<sbn::timing::PMTBeamSignal> RWMTimes,
186187 caf::SROpFlash &srflash,
187188 bool allowEmpty) {
188189
@@ -192,11 +193,16 @@ namespace caf
192193 srflash.timewidth = flash.TimeWidth ();
193194
194195 double firstTime = std::numeric_limits<double >::max ();
196+ std::map<int , double > startmap, risemap;
195197 for (const auto & hit: hits){
196198 double const hitTime = hit->HasStartTime ()? hit->StartTime (): hit->PeakTime ();
197199 if (firstTime > hitTime)
198200 firstTime = hitTime;
201+ if (!RWMTimes.empty ())
202+ sbn::timing::SelectFirstOpHitByTime (hit,startmap,risemap);
199203 }
204+ srflash.rwmtime = getFlashBunchTime (risemap, RWMTimes);
205+ std::cout << " Flash at Time " << flash.Time () << " has " << startmap.size () << " opHit channels, flashTime_rwm = " << srflash.rwmtime << " \n " ;
200206 srflash.firsttime = firstTime;
201207
202208 srflash.cryo = cryo; // 0 in SBND, 0/1 for E/W in ICARUS
Original file line number Diff line number Diff line change 4242#include " sbnobj/SBND/CRT/CRTTrack.hh"
4343#include " sbnobj/Common/CRT/CRTPMTMatching.hh"
4444#include " sbnobj/Common/CRT/CRTHitT0TaggingInfo.hh"
45+ #include " sbnobj/Common/PMT/Data/PMTBeamSignal.hh"
4546#include " nusimdata/SimulationBase/MCParticle.h"
4647#include " nusimdata/SimulationBase/MCTruth.h"
4748
@@ -256,6 +257,7 @@ namespace caf
256257 void FillICARUSOpFlash (const recob::OpFlash &flash,
257258 std::vector<recob::OpHit const *> const & hits,
258259 int cryo,
260+ std::vector<sbn::timing::PMTBeamSignal> RWMTimes,
259261 caf::SROpFlash &srflash,
260262 bool allowEmpty = false );
261263
You can’t perform that action at this time.
0 commit comments