@@ -64,6 +64,7 @@ sbn::TrackCaloSkimmer::TrackCaloSkimmer(fhicl::ParameterSet const& p)
6464 : EDAnalyzer{p},
6565 fFitExp (2 ),
6666 fFitConst(1 )
67+ , fCRTEventDisplayAlg(p.get<fhicl::ParameterSet>(" CRTEventDisplayAlg" ))
6768{
6869 // Grab config
6970 fPFPproducer = p.get < art::InputTag > (" PFPproducer" ," pandoraGausCryo0" );
@@ -260,6 +261,7 @@ void sbn::TrackCaloSkimmer::analyze(art::Event const& e)
260261
261262 // The raw digit list is not sorted, so make it into a map on the WireID
262263 std::map<geo::WireID, art::Ptr<raw::RawDigit>> rawdigits;
264+ /*
263265 for (const art::Ptr<raw::RawDigit> &d: rawdigitlist) {
264266
265267 std::vector<geo::WireID> wids;
@@ -279,7 +281,7 @@ void sbn::TrackCaloSkimmer::analyze(art::Event const& e)
279281
280282 rawdigits[wids[0]] = d;
281283 }
282-
284+ */
283285 // Collect all hits
284286 art::ValidHandle<std::vector<recob::Hit>> allhit_handle = e.getValidHandle <std::vector<recob::Hit>>(fHITproducer );
285287 std::vector<art::Ptr<recob::Hit>> allHits;
@@ -296,10 +298,12 @@ void sbn::TrackCaloSkimmer::analyze(art::Event const& e)
296298 const cheat::BackTrackerService *bt = NULL ;
297299
298300 if (simchannels.size ()) {
301+ /*
299302 art::ServiceHandle<cheat::BackTrackerService> bt_serv;
300303 id_to_ide_map = caf::PrepSimChannels(simchannels, *wireReadout);
301304 id_to_truehit_map = caf::PrepTrueHits(allHits, clock_data, *bt_serv.get());
302305 bt = bt_serv.get();
306+ */
303307 }
304308
305309 // service data
@@ -408,6 +412,23 @@ void sbn::TrackCaloSkimmer::analyze(art::Event const& e)
408412
409413 hasT0 = hasPFPT0 || hasCRTTrackT0 || hasCRTHitT0 || hasCRTSpacePointT0;
410414
415+ if (hasPFPT0)
416+ {
417+ fCRTEventDisplayAlg .SetPrint (true );
418+ fCRTEventDisplayAlg .SetMinTime (t0PFP - 3e3 );
419+ fCRTEventDisplayAlg .SetMaxTime (t0PFP + 3e3 );
420+
421+ auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const >()->DataFor (e);
422+
423+ if (hasCRTTrackT0)
424+ {
425+ std::cout << t0CRTTrack << std::endl;
426+ fCRTEventDisplayAlg .Draw (clockData, e, Form (" /exp/sbnd/data/users/hlay/crt_fall_production_2025/t0_event_displays/good/crtEventDisplayRun%iSubrun%iEvent%iPFP%li" , e.run (), e.subRun (), e.event (), p_pfp.key ()));
427+ }
428+ else
429+ fCRTEventDisplayAlg .Draw (clockData, e, Form (" /exp/sbnd/data/users/hlay/crt_fall_production_2025/t0_event_displays/bad/crtEventDisplayRun%iSubrun%iEvent%iPFP%li" , e.run (), e.subRun (), e.event (), p_pfp.key ()));
430+ }
431+ continue ;
411432 // "whicht0" should reflect the T0 used for the reconstruction of the drift coordinate.
412433 if (!hasT0) whicht0 = -1 ;
413434 // In this way, if a track is T0 tagged from PFP and CRT tagged, which T0 reflects the PFP Tag.
0 commit comments