allow disabling ptH weights in Analysis, and add test_templates.py