How to translate/rotate an .obj object to match another .obj object

Good morning everyone,

In my tests I am loading two .obj files. Both are displayed on screen without any problems and both have the center in 0,0,0.
To explain better imagine these two .obj files as a man’s head and a hat. Simply loading the two files shows the hat on the man’s head and the two objects are interpenetrating. To get around this problem I am simply cutting off part of the head with gl_ClipDistance. However, the two objects are no longer coincident after the cut.

PROBLEM:
If the cut on the head was not perfectly horizontal but was slightly tilted with respect to one or more axes how could I pass these angles to position the hat accordingly?

Thank you all.