cms-tau-pog / TauFW

Analysis framework for tau analysis at CMS using NanoAOD
9 stars 40 forks source link

Fix bug in resubmission: avoid mixing nominal and variations #72

Closed IzaakWN closed 2 months ago

IzaakWN commented 2 months ago

Fixing bug reported by @saswatinandan, which was caused by line https://github.com/cms-tau-pog/TauFW/blob/844b7d415f2d20e2195061b79149923030d23077/PicoProducer/python/pico/job.py#L87-L88 Here, if you want to resubmit a nominal sample with tag="",

"config/jobconfig_$SAMPLE$TAG_try[0-9]*.json"

was replaced to

"config/jobconfig_*_try[0-9]*.json"

However, this wildcard wil capture the config jsons of local variations like config/jobconfig_mutau_JTFDown_try6.json, which is actually for tag="_JTFDown". The algorithm in getcfgsamples wil pick the config JSON file with the largest try. This leads to conflicts...

There should be no wildcard there to avoid mixing different run in the same output directory, and it should actually be

"config/jobconfig_$CHANNEL$TAG_try[0-9]*.json"

So for tag="", you get strictly

"config/jobconfig_mutau_try[0-9]*.json"

and for tag="_JTFDown", you get

"config/jobconfig_mutau_JTFDown_try[0-9]*.json"