@@ -74,6 +74,7 @@ void sbnd::LightPropagationCorrection::produce(art::Event & e)
7474 fEvent = e.id ().event ();
7575 fRun = e.id ().run ();
7676 fSubrun = e.id ().subRun ();
77+ _flashgeo->InitializeFlashGeoAlgo ();
7778
7879 std::unique_ptr< std::vector<sbn::CorrectedOpFlashTiming> > correctedOpFlashTimes (new std::vector<sbn::CorrectedOpFlashTiming>);
7980 art::PtrMaker<sbn::CorrectedOpFlashTiming> make_correctedopflashtime_ptr{e};
@@ -128,9 +129,6 @@ void sbnd::LightPropagationCorrection::produce(art::Event & e)
128129 ResetSliceInfo ();
129130 // --- Get the slice
130131 auto & slice = sliceVect[ix];
131-
132- // --- Get the slice nu score and check whether we want to correct for it
133-
134132 // Now I need to get all the hits associated to this flash and get the timing for all of them
135133 // Get the slices PFPs
136134 double _sliceMaxNuScore = -9999 .;
@@ -150,11 +148,7 @@ void sbnd::LightPropagationCorrection::produce(art::Event & e)
150148 fRecoVx = xyz_vertex.X ();
151149 fRecoVy = xyz_vertex.Y ();
152150 fRecoVz = xyz_vertex.Z ();
153- }
154- // If correct light propagation time
155-
156-
157- // Get the SP associated to the PFP and then get the hits associated to the SP. ---> Hits associated to the PFP
151+ }
158152 // Get the spacepoints associated to the PFParticle
159153 std::vector<art::Ptr<recob::SpacePoint>> PFPSpacePointsVect = pfp_sp_assns.at (pfp.key ());
160154 // Get the SP Hit assns
@@ -170,7 +164,6 @@ void sbnd::LightPropagationCorrection::produce(art::Event & e)
170164 fSpacePointY .push_back (SP->position ().Y ());
171165 fSpacePointZ .push_back (SP->position ().Z ());
172166 fSpacePointIntegral .push_back (SPHit.at (0 )->Integral ());
173-
174167 // Fill Bayrcenter Position
175168 if (SP->position ().X () < 0 ){
176169 fChargeWeightX [0 ] += SP->position ().X () * SPHit.at (0 )->Integral ();
0 commit comments