@@ -154,17 +154,25 @@ namespace caf
154154 srmatch.flashPosition = SRVector3D (match.flashPosition .X (), match.flashPosition .Y (), match.flashPosition .Z ());
155155 srmatch.flashYWidth = match.flashYWidth ;
156156 srmatch.flashZWidth = match.flashZWidth ;
157- srmatch. flashClassification = static_cast < int >(match. flashClassification ) ;
157+ unsigned int topen = 0 , topex = 0 , sideen = 0 , sideex = 0 ;
158158 for (const auto & matchedCRTHit : match.matchedCRTHits ){
159- std::cout << " CRTPMTTimeDiff = " << matchedCRTHit.PMTTimeDiff << " \n " ;
160159 caf::SRMatchedCRT matchedCRT;
161160 matchedCRT.PMTTimeDiff = matchedCRTHit.PMTTimeDiff ;
162161 matchedCRT.time = matchedCRTHit.time ;
163162 matchedCRT.sys = matchedCRTHit.sys ;
164163 matchedCRT.region = matchedCRTHit.region ;
165164 matchedCRT.position = SRVector3D (matchedCRTHit.position .X (), matchedCRTHit.position .Y (), matchedCRTHit.position .Z ());
165+ if (matchedCRTHit.PMTTimeDiff < 0 ){
166+ if (matchedCRTHit.sys == 0 ) topen++;
167+ else if (matchedCRTHit.sys == 1 ) sideen++;
168+ }
169+ else if (matchedCRTHit.PMTTimeDiff >= 0 ){
170+ if (matchedCRTHit.sys == 0 ) topex++;
171+ else if (matchedCRTHit.sys == 1 ) sideex++;
172+ }
166173 srmatch.matchedCRTHits .push_back (matchedCRT);
167174 }
175+ srmatch.flashClassification = static_cast <int >(sbn::crt::assignFlashClassification (topen, topex, sideen, sideex, 0 , 0 ));
168176 }
169177
170178
0 commit comments