We use optogenetic tools and thermal perturbation to manipulate the activity of genetically defined cell types and brain regions in order to dissect their contribution to specific behaviors and cognitive functions.