Analysis and modeling of the response function of the CLYC detector