     
     func isFront(_ event: ISAEvent, type: SearchType) -> Bool {
         let eventId = Int(event.eventId)
-        let marker = getMarker(event.param3)
-        let typeMarker = type == .recoil ? kRecoilMarker : kFissionOrAlphaMarker
-        return (typeMarker == marker) && (dataProtocol.AFron(1) == eventId || dataProtocol.AFron(2) == eventId || dataProtocol.AFron(3) == eventId || dataProtocol.AdFr(1) == eventId || dataProtocol.AdFr(2) == eventId || dataProtocol.AdFr(3) == eventId)
+        let searchRecoil = type == .recoil
+        let currentRecoil = isRecoil(event)
+        let sameType = (searchRecoil && currentRecoil) || (!searchRecoil && !currentRecoil)
+        return sameType && (dataProtocol.AFron(1) == eventId || dataProtocol.AFron(2) == eventId || dataProtocol.AFron(3) == eventId || dataProtocol.AdFr(1) == eventId || dataProtocol.AdFr(2) == eventId || dataProtocol.AdFr(3) == eventId)
     }
     
     func isFissionOrAlphaWel(_ event: ISAEvent) -> Bool {
         let eventId = Int(event.eventId)
-        let marker = getMarker(event.param3)
-        return (kFissionOrAlphaMarker == marker) && (dataProtocol.AWel == eventId || dataProtocol.AWel(1) == eventId || dataProtocol.AWel(2) == eventId || dataProtocol.AWel(3) == eventId || dataProtocol.AWel(4) == eventId)
+        return !isRecoil(event) && (dataProtocol.AWel == eventId || dataProtocol.AWel(1) == eventId || dataProtocol.AWel(2) == eventId || dataProtocol.AWel(3) == eventId || dataProtocol.AWel(4) == eventId)
     }
     
     func isBack(_ event: ISAEvent, type: SearchType) -> Bool {
         let eventId = Int(event.eventId)
-        let marker = getMarker(event.param3)
-        let typeMarker = type == .recoil ? kRecoilMarker : kFissionOrAlphaMarker
-        return (typeMarker == marker) && (dataProtocol.ABack(1) == eventId || dataProtocol.ABack(2) == eventId || dataProtocol.ABack(3) == eventId || dataProtocol.AdBk(1) == eventId || dataProtocol.AdBk(2) == eventId || dataProtocol.AdBk(3) == eventId)
+        let searchRecoil = type == .recoil
+        let currentRecoil = isRecoil(event)
+        let sameType = (searchRecoil && currentRecoil) || (!searchRecoil && !currentRecoil)
+        return sameType && (dataProtocol.ABack(1) == eventId || dataProtocol.ABack(2) == eventId || dataProtocol.ABack(3) == eventId || dataProtocol.AdBk(1) == eventId || dataProtocol.AdBk(2) == eventId || dataProtocol.AdBk(3) == eventId)
     }
     
     func eventNumber() -> CUnsignedLongLong {

        let energy = getEnergy(event, type: .alpha)
        let info = [kEnergy: energy,
                    kDeltaTime: deltaTime,
                    kEventNumber: eventNumber()] as [String : Any]
        alpha2FrontPerAct.append(info)
    }
    

    
    func logResultsHeader() {
        let startParticle = startParticleType == .fission ? "F" : "A"
        var header = String(format: "Event(Recoil),E(RFron),RFronMarker,dT(RFron-$Fron),TOF,dT(TOF-RFron),Event($),Summ($Fron),$Fron,$FronMarker,dT($FronFirst-Next),Strip($Fron),$Back,$BackMarker,dT($Fron-$Back),Strip($Back),$Wel,$WelMarker,$WelPos,Neutrons,Gamma,dT($Fron-Gamma),FON,Recoil(Special)")
        if searchAlpha2 {
            header += ",Event(Alpha2),E(Alpha2),Alpha2Marker,dT(Alpha1-Alpha2)"
        }
        header = header.replacingOccurrences(of: "$", with: startParticle)
        let components = header.components(separatedBy: ",")
