Skip to content

Commit

Permalink
Applied last comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MRD2F committed Nov 14, 2018
1 parent e1891f7 commit a9f6b7c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion RecoTauTag/RecoTau/plugins/DPFIsolation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class DPFIsolation : public deep_tau::DeepTauBase {
desc.add<edm::InputTag>("pfcands", edm::InputTag("packedPFCandidates"));
desc.add<edm::InputTag>("taus", edm::InputTag("slimmedTaus"));
desc.add<edm::InputTag>("vertices", edm::InputTag("offlineSlimmedPrimaryVertices"));
desc.add<std::string>("graph_file", "RecoTauTag/TrainingFiles/data/DPFTauId/DPFIsolation_2017v0.pb");
desc.add<std::string>("graph_file", "RecoTauTag/TrainingFiles/data/DPFTauId/DPFIsolation_2017v0_quantized.pb");
desc.add<unsigned>("version", 0);
desc.add<bool>("mem_mapped", false);

Expand Down
2 changes: 1 addition & 1 deletion RecoTauTag/RecoTau/plugins/DeepTauId.cc
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class DeepTauId : public deep_tau::DeepTauBase {
desc.add<edm::InputTag>("electrons", edm::InputTag("slimmedElectrons"));
desc.add<edm::InputTag>("muons", edm::InputTag("slimmedMuons"));
desc.add<edm::InputTag>("taus", edm::InputTag("slimmedTaus"));
desc.add<std::string>("graph_file", "RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v1_20L1024N.pb");
desc.add<std::string>("graph_file", "RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v1_20L1024N_quantized.pb");
desc.add<bool>("mem_mapped", false);


Expand Down
6 changes: 4 additions & 2 deletions RecoTauTag/RecoTau/python/tools/runTauIdMVA.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,9 +720,11 @@ def processDeepProducer(self, producer_name, tauIDSources, workingPoints_):


def getDpfTauVersion(self, file_name):
"""returns the DNN version. Expected that the file name contains a version number in the following format: {year}v{version}"""
"""returns the DNN version. File name should contain a version label with data takig year (2011-2, 2015-8) and \
version number (vX), e.g. 2017v0, in general the following format: {year}v{version}"""
version_search = re.search('201[125678]v([0-9]+)[\._]', file_name)
if not version_search:
raise RuntimeError('File "{}" has an invalid name pattern. Unable to extract version number.'.format(file_name))
raise RuntimeError('File "{}" has an invalid name pattern, should be in the format "{year}v{version}". \
Unable to extract version number.'.format(file_name))
version = version_search.group(1)
return int(version)

0 comments on commit a9f6b7c

Please sign in to comment.