How to check if the module is activated or not in the factory hooks of the Acquia site?

I have the obligation to set up conditions according to the state of the module in the factory hookup points of the acquia site. Is there a way to check if the module is enabled or disabled in the factory hooks? Please help.