Method to grab URL hash in Twig or craft.request?
This isn't possible because the #hash-part isn't even send to the server. See this question on StackOverflow: Can PHP read the hash portion of the URL?

But if you use ?hash=something instead, these functions will help you: getParam() and getQuery()