How to use external code in TSelector-based analysis progra

Dear ROOT developers,

Long time ago with the help of ROOT developers I wrote some code based on TSelector method
(to read and analyze ROOT tree with physics events). Now I need to use in addition external code
(say, to calibrate hadronic jet energy). Could you please give me some general recipe how to do it?
(I know that as a minimum I need to include .h file with the corresponding class from this external code
but it is not sufficient, probably I should also create library but don’t know how to do it.) Note also that during ROOT installation I did not define $ROOTSYS variable (i.e. using “location independent installation”).

If needed, I can provide details.

Thanks in advance
Ilya Tsukerman