@@ -506,6 +506,7 @@ void CAFMaker::BlindEnergyParameters(StandardRecord* brec) {
506506
507507void CAFMaker::SBNDShiftCRTReference (StandardRecord &rec, double SBNDFrame) const {
508508
509+ std::cout << " hellooooo PMT " << std::endl;
509510 // CRT Space Point
510511 for (SRCRTSpacePoint &sp: rec.crt_spacepoints ){
511512 sp.time += SBNDFrame; // ns
@@ -524,7 +525,7 @@ void CAFMaker::SBNDShiftCRTReference(StandardRecord &rec, double SBNDFrame) cons
524525}
525526
526527void CAFMaker::SBNDShiftPMTReference (StandardRecord &rec, double SBNDFrame) const {
527-
528+ std::cout << " hellooooo PMT " << std::endl;
528529 double SBNDFrame_us = SBNDFrame / 1000.0 ; // convert ns to us
529530
530531 // Op Flash
@@ -2463,16 +2464,18 @@ void CAFMaker::produce(art::Event& evt) noexcept {
24632464 // For more information, see:
24642465 // https://sbn-docdb.fnal.gov/cgi-bin/sso/RetrieveFile?docid=43090
24652466
2466- if (isRealData && (fDet == kSBND ) && (rec. sbnd_frames . frameApplyAtCaf != 0.0 ) )
2467+ if (isRealData && (fDet == kSBND ))
24672468 {
2468- mf::LogInfo (" CAFMaker" ) << " Setting Reference Timing for timing object in SBND \n "
2469- << " Shift Apply At Caf Level = " << rec.sbnd_frames .frameApplyAtCaf << " ns\n " ;
2470-
2471- // shift reference frame for CRT objects: crt trk, crt sp, crt sp match, crt trk match
2472- SBNDShiftCRTReference (rec, rec.sbnd_frames .frameApplyAtCaf );
2469+ if ((rec.sbnd_frames .frameApplyAtCaf != kSignalingNaN ) && (rec.sbnd_frames .frameApplyAtCaf != 0.0 )){
2470+ mf::LogInfo (" CAFMaker" ) << " Setting Reference Timing for timing object in SBND \n "
2471+ << " Shift Apply At Caf Level = " << rec.sbnd_frames .frameApplyAtCaf << " ns\n " ;
2472+
2473+ // shift reference frame for CRT objects: crt trk, crt sp, crt sp match, crt trk match
2474+ SBNDShiftCRTReference (rec, rec.sbnd_frames .frameApplyAtCaf );
24732475
2474- // shift reference frame for PMT objects: opflash, opt0
2475- SBNDShiftPMTReference (rec, rec.sbnd_frames .frameApplyAtCaf );
2476+ // shift reference frame for PMT objects: opflash, opt0
2477+ SBNDShiftPMTReference (rec, rec.sbnd_frames .frameApplyAtCaf );
2478+ }
24762479 }
24772480
24782481 // Get metadata information for header
0 commit comments