Logic Pro 8 Applying a groove template to MIDI


I'm not sure if the title I chose is the best for what I'm about to ask, but here it goes:

I'm trying to double a guitar solo with a MIDI synth, but I'm having a hard time playing the keyboard exactly the same way I played the guitar. Is there a way to beat map the guitar track, create a groove template and apply it on the MIDI track?