The deerstalker through its association with Sherlock Holmes has become stereotypical headgear for early detectives.
Its a hat is also still used in rural areas of Britain but dates from the Victorian era when you wore correct fashion to do your deer hunting.
The deerstalker was possibly first associated with the character of Sherlock Holmes in a 1899 play, but it was a book cover illustration that probably cemented the two together. Although it may have been several Basil Rathbones films that final pegged them permanently together.
Made of usually of tweed with its distinctive fore and aft brims and ear flaps that are usually seen tied up at the top of the hat rather than over the ears and tied under the chin.