CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
runTauIdMVA.TauIDEmbedder Class Reference
Inheritance diagram for runTauIdMVA.TauIDEmbedder:

Public Member Functions

def __init__ (self, process, debug=False, updatedTauName="slimmedTausNewID", toKeep=["deepTau2017v2p1"], tauIdDiscrMVA_trainings_run2_2017={ 'tauIdMVAIsoDBoldDMwLT2017' :"tauIdMVAIsoDBoldDMwLT2017", }, tauIdDiscrMVA_WPs_run2_2017={ 'tauIdMVAIsoDBoldDMwLT2017' :{ 'Eff95' :"DBoldDMwLTEff95", 'Eff90' :"DBoldDMwLTEff90", 'Eff80' :"DBoldDMwLTEff80", 'Eff70' :"DBoldDMwLTEff70", 'Eff60' :"DBoldDMwLTEff60", 'Eff50' :"DBoldDMwLTEff50", 'Eff40' :"DBoldDMwLTEff40" } }, tauIdDiscrMVA_2017_version="v1", conditionDB="" # preparational DB:'frontier://FrontierPrep/CMS_CONDITIONS')
 
def get_cmssw_version_number (klass, debug=False)
 
def getDeepTauVersion (self, file_name)
 
def getDpfTauVersion (self, file_name)
 
def is_above_cmssw_version (klass, release=9, subversion=4, patch=0, debug=False)
 
def loadMVA_WPs_run2_2017 (self)
 
def processDeepProducer (self, producer_name, tauIDSources, workingPoints_)
 
def runTauID (self)
 
def tauIDMVAinputs (self, module, wp)
 

Static Public Member Functions

def get_cmssw_version (debug=False)
 
def versionToInt (release=9, subversion=4, patch=0, debug=False)
 

Public Attributes

 debug
 
 process
 
 rerunIsolationNewDMMVArun2016v1Task
 
 rerunIsolationNewDMMVArun2017v2Task
 
 rerunIsolationOldDMdR0p3MVArun2017v2Task
 
 rerunIsolationOldDMMVArun2016v1Task
 
 rerunIsolationOldDMMVArun2017v1Task
 
 rerunIsolationOldDMMVArun2017v2Task
 
 tauIdDiscrMVA_2017_version
 
 tauIdDiscrMVA_trainings_run2_2017
 
 tauIdDiscrMVA_WPs_run2_2017
 
 toKeep
 
 updatedTauName
 

Static Public Attributes

 availableDiscriminators
 

Detailed Description

class to rerun the tau seq and acces trainings from the database

Definition at line 9 of file runTauIdMVA.py.

Constructor & Destructor Documentation

◆ __init__()

def runTauIdMVA.TauIDEmbedder.__init__ (   self,
  process,
  debug = False,
  updatedTauName = "slimmedTausNewID",
  toKeep = ["deepTau2017v2p1"],
  tauIdDiscrMVA_trainings_run2_2017 = { 'tauIdMVAIsoDBoldDMwLT2017' : "tauIdMVAIsoDBoldDMwLT2017", },
  tauIdDiscrMVA_WPs_run2_2017 = {                     'tauIdMVAIsoDBoldDMwLT2017' : {                         'Eff95' : "DBoldDMwLTEff95",                         'Eff90' : "DBoldDMwLTEff90",                         'Eff80' : "DBoldDMwLTEff80",                         'Eff70' : "DBoldDMwLTEff70",                         'Eff60' : "DBoldDMwLTEff60",                         'Eff50' : "DBoldDMwLTEff50",                         'Eff40' : "DBoldDMwLTEff40"                     }                  },
  tauIdDiscrMVA_2017_version = "v1",
  conditionDB = "" # preparational DB: 'frontier://FrontierPrep/CMS_CONDITIONS' 
)

Definition at line 18 of file runTauIdMVA.py.

18  def __init__(self, process, debug = False,
19  updatedTauName = "slimmedTausNewID",
20  toKeep = ["deepTau2017v2p1"],
21  tauIdDiscrMVA_trainings_run2_2017 = { 'tauIdMVAIsoDBoldDMwLT2017' : "tauIdMVAIsoDBoldDMwLT2017", },
22  tauIdDiscrMVA_WPs_run2_2017 = {
23  'tauIdMVAIsoDBoldDMwLT2017' : {
24  'Eff95' : "DBoldDMwLTEff95",
25  'Eff90' : "DBoldDMwLTEff90",
26  'Eff80' : "DBoldDMwLTEff80",
27  'Eff70' : "DBoldDMwLTEff70",
28  'Eff60' : "DBoldDMwLTEff60",
29  'Eff50' : "DBoldDMwLTEff50",
30  'Eff40' : "DBoldDMwLTEff40"
31  }
32  },
33  tauIdDiscrMVA_2017_version = "v1",
34  conditionDB = "" # preparational DB: 'frontier://FrontierPrep/CMS_CONDITIONS'
35  ):
36  super(TauIDEmbedder, self).__init__()
37  self.process = process
38  self.debug = debug
39  self.updatedTauName = updatedTauName
40  self.process.load('RecoTauTag.Configuration.loadRecoTauTagMVAsFromPrepDB_cfi')
41  if len(conditionDB) != 0:
42  self.process.CondDBTauConnection.connect = cms.string(conditionDB)
43  self.process.loadRecoTauTagMVAsFromPrepDB.connect = cms.string(conditionDB)
44  # if debug:
45  # print self.process.CondDBTauConnection.connect
46  # print dir(self.process.loadRecoTauTagMVAsFromPrepDB)
47  # print self.process.loadRecoTauTagMVAsFromPrepDB.parameterNames_
48 
49  self.tauIdDiscrMVA_trainings_run2_2017 = tauIdDiscrMVA_trainings_run2_2017
50  self.tauIdDiscrMVA_WPs_run2_2017 = tauIdDiscrMVA_WPs_run2_2017
51  self.tauIdDiscrMVA_2017_version = tauIdDiscrMVA_2017_version
52  for discr in toKeep:
53  if discr not in TauIDEmbedder.availableDiscriminators:
54  raise RuntimeError('TauIDEmbedder: discriminator "{}" is not supported'.format(discr))
55  self.toKeep = toKeep
56 
57 

Member Function Documentation

◆ get_cmssw_version()

def runTauIdMVA.TauIDEmbedder.get_cmssw_version (   debug = False)
static
returns 'CMSSW_X_Y_Z'

Definition at line 59 of file runTauIdMVA.py.

59  def get_cmssw_version(debug = False):
60  """returns 'CMSSW_X_Y_Z'"""
61  cmssw_version = os.environ["CMSSW_VERSION"]
62  if debug: print ("get_cmssw_version:", cmssw_version)
63  return cmssw_version
64 

◆ get_cmssw_version_number()

def runTauIdMVA.TauIDEmbedder.get_cmssw_version_number (   klass,
  debug = False 
)
returns '(release, subversion, patch)' (without 'CMSSW_')

Definition at line 66 of file runTauIdMVA.py.

66  def get_cmssw_version_number(klass, debug = False):
67  """returns '(release, subversion, patch)' (without 'CMSSW_')"""
68  v = klass.get_cmssw_version().split("CMSSW_")[1].split("_")[0:3]
69  if debug: print ("get_cmssw_version_number:", v)
70  if v[2] == "X":
71  patch = -1
72  else:
73  patch = int(v[2])
74  return int(v[0]), int(v[1]), patch
75 

References createfilelist.int, and cms::dd.split().

◆ getDeepTauVersion()

def runTauIdMVA.TauIDEmbedder.getDeepTauVersion (   self,
  file_name 
)
returns the DeepTau year, version, subversion. File name should contain a version label with data takig year \
(2011-2, 2015-8), version number (vX) and subversion (pX), e.g. 2017v0p6, in general the following format: \
{year}v{version}p{subversion}

Definition at line 906 of file runTauIdMVA.py.

906  def getDeepTauVersion(self, file_name):
907  """returns the DeepTau year, version, subversion. File name should contain a version label with data takig year \
908  (2011-2, 2015-8), version number (vX) and subversion (pX), e.g. 2017v0p6, in general the following format: \
909  {year}v{version}p{subversion}"""
910  version_search = re.search('(201[125678])v([0-9]+)(p[0-9]+|)[\._]', file_name)
911  if not version_search:
912  raise RuntimeError('File "{}" has an invalid name pattern, should be in the format "{year}v{version}p{subversion}". \
913  Unable to extract version number.'.format(file_name))
914  year = version_search.group(1)
915  version = version_search.group(2)
916  subversion = version_search.group(3)
917  if len(subversion) > 0:
918  subversion = subversion[1:]
919  else:
920  subversion = 0
921  return int(year), int(version), int(subversion)

References createfilelist.int.

◆ getDpfTauVersion()

def runTauIdMVA.TauIDEmbedder.getDpfTauVersion (   self,
  file_name 
)
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}

Definition at line 896 of file runTauIdMVA.py.

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

References createfilelist.int.

◆ is_above_cmssw_version()

def runTauIdMVA.TauIDEmbedder.is_above_cmssw_version (   klass,
  release = 9,
  subversion = 4,
  patch = 0,
  debug = False 
)

Definition at line 84 of file runTauIdMVA.py.

84  def is_above_cmssw_version(klass, release=9, subversion=4, patch=0, debug = False):
85  split_cmssw_version = klass.get_cmssw_version_number()
86  if klass.versionToInt(release, subversion, patch) > klass.versionToInt(split_cmssw_version[0], split_cmssw_version[1], split_cmssw_version[2]):
87  if debug: print ("is_above_cmssw_version:", False)
88  return False
89  else:
90  if debug: print ("is_above_cmssw_version:", True)
91  return True
92 

Referenced by runTauIdMVA.TauIDEmbedder.runTauID().

◆ loadMVA_WPs_run2_2017()

def runTauIdMVA.TauIDEmbedder.loadMVA_WPs_run2_2017 (   self)

Definition at line 96 of file runTauIdMVA.py.

96  def loadMVA_WPs_run2_2017(self):
97  if self.debug: print ("loadMVA_WPs_run2_2017: performed")
98  global cms
99  for training, gbrForestName in self.tauIdDiscrMVA_trainings_run2_2017.items():
100 
101  self.process.loadRecoTauTagMVAsFromPrepDB.toGet.append(
102  cms.PSet(
103  record = cms.string('GBRWrapperRcd'),
104  tag = cms.string("RecoTauTag_%s%s" % (gbrForestName, self.tauIdDiscrMVA_2017_version)),
105  label = cms.untracked.string("RecoTauTag_%s%s" % (gbrForestName, self.tauIdDiscrMVA_2017_version))
106  )
107  )
108 
109  for WP in self.tauIdDiscrMVA_WPs_run2_2017[training].keys():
110  self.process.loadRecoTauTagMVAsFromPrepDB.toGet.append(
111  cms.PSet(
112  record = cms.string('PhysicsTGraphPayloadRcd'),
113  tag = cms.string("RecoTauTag_%s%s_WP%s" % (gbrForestName, self.tauIdDiscrMVA_2017_version, WP)),
114  label = cms.untracked.string("RecoTauTag_%s%s_WP%s" % (gbrForestName, self.tauIdDiscrMVA_2017_version, WP))
115  )
116  )
117 
118  self.process.loadRecoTauTagMVAsFromPrepDB.toGet.append(
119  cms.PSet(
120  record = cms.string('PhysicsTFormulaPayloadRcd'),
121  tag = cms.string("RecoTauTag_%s%s_mvaOutput_normalization" % (gbrForestName, self.tauIdDiscrMVA_2017_version)),
122  label = cms.untracked.string("RecoTauTag_%s%s_mvaOutput_normalization" % (gbrForestName, self.tauIdDiscrMVA_2017_version))
123  )
124  )
125 

References DigiComparisonTask.debug, TestTask.debug, TPComparisonTask.debug, QIE11Task.debug, PedestalTask.debug, RecHitTask.debug, QIE10Task.debug, UMNioTask.debug, ZDCTask.debug, HcalOfflineHarvesting.debug, HcalOnlineHarvesting.debug, HFRaddamTask.debug, LaserTask.debug, NoCQTask.debug, RawTask.debug, TPTask.debug, InterpolationDebug.debug, DigiTask.debug, LEDTask.debug, runTauIdMVA.TauIDEmbedder.debug, DTDigiToRawModule.debug, CSCRPCData.debug, CSCTMBScope.debug, ALIUtils.debug, magneticfield::eSector.debug, CSCDCCUnpacker.debug, DTDigiToRaw.debug, magneticfield::bRod.debug, CSCSegAlgoPreClustering.debug, DTSegment4DT0Corrector.debug, DTRecHitProducer.debug, DTRecSegment4DProducer.debug, RPCPointProducer.debug, crabFunctions.CrabController.debug, DTSegmentsTask.debug, QCDSingleJetFilter.debug, MuonSeedProducer.debug, HiggsTo2GammaSkim.debug, HiggsToZZ4LeptonsSkimEff.debug, magneticfield::bSector.debug, HiggsToZZ4LeptonsPreFilter.debug, DTOccupancyEfficiency.debug, DTTTrigCorrectionFirst.debug, HiggsToZZ4LeptonsSkim.debug, DTRecSegment2DProducer.debug, DTDDUUnpacker.debug, DTTPDeadWriter.debug, pkg.AbstractPkg.debug, DTTTrigWriter.debug, magneticfield::bSlab.debug, JetAnaPythia< Jet >.debug, DTRecSegment2DExtendedProducer.debug, DTT0CalibrationRMS.debug, MuScleFitFilter.debug, CSCDCCEventData.debug, SiPixelRawToDigi.debug, CSCAnodeLCTAnalyzer.debug, CSCCathodeLCTAnalyzer.debug, DTNoiseComputation.debug, magneticfield::bLayer.debug, CSCSegAlgoShowering.debug, DTOccupancyPoint.debug, MuScleFitPlotter.debug, GEMCSCSegAlgoRR.debug, DTTTrigSyncT0Only.debug, DTROS25Unpacker.debug, rrapi.RRApi.debug, DTSpyReader.debug, util.rrapi.RRApi.debug, DTEfficiencyTask.debug, DTT0Calibration.debug, ME0SegmentAlgorithm.debug, DTTTrigCalibration.debug, DTRunConditionVar.debug, HeavyChHiggsToTauNuSkim.debug, GEMSegmentAlgorithm.debug, PythiaFilterEMJetHeep.debug, CSCDDUEventData.debug, DTChamberEfficiencyTask.debug, DTCombinatorialPatternReco4D.debug, DTMeantimerPatternReco4D.debug, DTRefitAndCombineReco4D.debug, HCALResponse.debug, DTClusterer.debug, DTChamberEfficiency.debug, FCDTask.debug, CSCCLCTData.debug, MuonSeedCreator.debug, DTTMax.debug, DTLinearDriftAlgo.debug, CSCTimingExtractor.debug, DTVDriftCalibration.debug, DTTTrigSyncFromDB.debug, MuonSeedCleaner.debug, CSCTMBData.debug, DTNoDriftAlgo.debug, DTParametrizedDriftAlgo.debug, DTCombinatorialPatternReco.debug, MagGeoBuilderFromDDD.debug, PixelDataFormatter.debug, DTTimingExtractor.debug, DTMeantimerPatternReco.debug, DTCombinatorialExtendedPatternReco.debug, DTTTrigSyncTOFCorr.debug, MuonSeedBuilder.debug, DTLinearDriftFromDBAlgo.debug, DTSegmentUpdator.debug, CSCTMBHeader.debug, CSCSegAlgoDF.debug, CSCEventData.debug, MuScleFitUtils.debug, BaseParticlePropagator.debug, CSCTriggerPrimitivesReader.debug, magneticfield::BaseVolumeHandle.debug, CSCSegAlgoST.debug, CSCALCTTrailer.debug, CSCALCTHeader.debug, notcub::CachingHostAllocator.debug, notcub::CachingDeviceAllocator.debug, EcalBoundaryInfoCalculator< EcalDetId >.debug, crabFunctions.CrabTask.debug, Pythia8::PowhegHooksBB4L.debug, HltDiff.debug, mps_monitormerge.items, relativeConstraints.keys, edm::ProductLabels.process, runTauIdMVA.TauIDEmbedder.process, DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, cscdqm::HWStandbyType.process, DTTtrigWorkflow.DTttrigWorkflow.process, EgammaHLTValidationUtils.EgammaDQMModuleMaker.process, Config.Process.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, JsonOutputProducer::JsonConfigurationBlock.process, Config.TestModuleCommand.process, runTauIdMVA.TauIDEmbedder.tauIdDiscrMVA_2017_version, runTauIdMVA.TauIDEmbedder.tauIdDiscrMVA_trainings_run2_2017, and runTauIdMVA.TauIDEmbedder.tauIdDiscrMVA_WPs_run2_2017.

Referenced by runTauIdMVA.TauIDEmbedder.runTauID().

◆ processDeepProducer()

def runTauIdMVA.TauIDEmbedder.processDeepProducer (   self,
  producer_name,
  tauIDSources,
  workingPoints_ 
)

Definition at line 881 of file runTauIdMVA.py.

881  def processDeepProducer(self, producer_name, tauIDSources, workingPoints_):
882  for target,points in six.iteritems(workingPoints_):
883  setattr(tauIDSources, 'by{}VS{}raw'.format(producer_name[0].upper()+producer_name[1:], target),
884  cms.PSet(inputTag = cms.InputTag(producer_name, 'VS{}'.format(target)), workingPointIndex = cms.int32(-1)))
885 
886  cut_expressions = []
887  for index, (point,cut) in enumerate(six.iteritems(points)):
888  cut_expressions.append(str(cut))
889 
890  setattr(tauIDSources, 'by{}{}VS{}'.format(point, producer_name[0].upper()+producer_name[1:], target),
891  cms.PSet(inputTag = cms.InputTag(producer_name, 'VS{}'.format(target)), workingPointIndex = cms.int32(index)))
892 
893  setattr(getattr(self.process, producer_name), 'VS{}WP'.format(target), cms.vstring(*cut_expressions))
894 
895 

References edm::ProductLabels.process, runTauIdMVA.TauIDEmbedder.process, DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, cscdqm::HWStandbyType.process, DTTtrigWorkflow.DTttrigWorkflow.process, EgammaHLTValidationUtils.EgammaDQMModuleMaker.process, Config.Process.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, JsonOutputProducer::JsonConfigurationBlock.process, Config.TestModuleCommand.process, str, and pileupCalc.upper.

◆ runTauID()

def runTauIdMVA.TauIDEmbedder.runTauID (   self)

Definition at line 126 of file runTauIdMVA.py.

126  def runTauID(self):
127  self.process.rerunMvaIsolationTask = cms.Task()
128  self.process.rerunMvaIsolationSequence = cms.Sequence()
129  tauIDSources = cms.PSet()
130 
131  # rerun the seq to obtain the 2017 nom training with 0.5 iso cone, old DM, ptph>1, trained on 2017MCv1
132  if "2017v1" in self.toKeep:
133  self.tauIdDiscrMVA_2017_version = "v1"
134  self.tauIdDiscrMVA_trainings_run2_2017 = {
135  'tauIdMVAIsoDBoldDMwLT2017' : "tauIdMVAIsoDBoldDMwLT2017",
136  }
137  self.tauIdDiscrMVA_WPs_run2_2017 = {
138  'tauIdMVAIsoDBoldDMwLT2017' : {
139  'Eff95' : "DBoldDMwLTEff95",
140  'Eff90' : "DBoldDMwLTEff90",
141  'Eff80' : "DBoldDMwLTEff80",
142  'Eff70' : "DBoldDMwLTEff70",
143  'Eff60' : "DBoldDMwLTEff60",
144  'Eff50' : "DBoldDMwLTEff50",
145  'Eff40' : "DBoldDMwLTEff40"
146  }
147  }
148  # update the list of available in DB samples
149  if not self.is_above_cmssw_version(9, 4, 4, self.debug):
150  if self.debug: print ("runTauID: not is_above_cmssw_version(9, 4, 4). Will update the list of available in DB samples to access 2017v1")
151  self.loadMVA_WPs_run2_2017()
152 
153  self.process.rerunDiscriminationByIsolationOldDMMVArun2017v1raw = patDiscriminationByIsolationMVArun2v1raw.clone(
154  PATTauProducer = cms.InputTag('slimmedTaus'),
155  Prediscriminants = noPrediscriminants,
156  loadMVAfromDB = cms.bool(True),
157  mvaName = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1"),#RecoTauTag_tauIdMVAIsoDBoldDMwLT2016v1 writeTauIdDiscrMVAs
158  mvaOpt = cms.string("DBoldDMwLTwGJ"),
159  verbosity = cms.int32(0)
160  )
161 
162  self.process.rerunDiscriminationByIsolationOldDMMVArun2017v1 = patDiscriminationByIsolationMVArun2v1.clone(
163  PATTauProducer = cms.InputTag('slimmedTaus'),
164  Prediscriminants = noPrediscriminants,
165  toMultiplex = cms.InputTag('rerunDiscriminationByIsolationOldDMMVArun2017v1raw'),
166  loadMVAfromDB = cms.bool(True),
167  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_mvaOutput_normalization"), #writeTauIdDiscrMVAoutputNormalizations
168  mapping = cms.VPSet(
169  cms.PSet(
170  category = cms.uint32(0),
171  cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1"), #writeTauIdDiscrWPs
172  variable = cms.string("pt"),
173  )
174  ),
175  workingPoints = cms.vstring(
176  "_WPEff95",
177  "_WPEff90",
178  "_WPEff80",
179  "_WPEff70",
180  "_WPEff60",
181  "_WPEff50",
182  "_WPEff40"
183  )
184  )
185 
186  self.rerunIsolationOldDMMVArun2017v1Task = cms.Task(
187  self.process.rerunDiscriminationByIsolationOldDMMVArun2017v1raw,
188  self.process.rerunDiscriminationByIsolationOldDMMVArun2017v1
189  )
190  self.process.rerunMvaIsolationTask.add(self.rerunIsolationOldDMMVArun2017v1Task)
191  self.process.rerunMvaIsolationSequence += cms.Sequence(self.rerunIsolationOldDMMVArun2017v1Task)
192 
193  tauIDSources.byIsolationMVArun2017v1DBoldDMwLTraw2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2017v1", "raw")
194  tauIDSources.byVVLooseIsolationMVArun2017v1DBoldDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2017v1", "_WPEff95")
195  tauIDSources.byVLooseIsolationMVArun2017v1DBoldDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2017v1", "_WPEff90")
196  tauIDSources.byLooseIsolationMVArun2017v1DBoldDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2017v1", "_WPEff80")
197  tauIDSources.byMediumIsolationMVArun2017v1DBoldDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2017v1", "_WPEff70")
198  tauIDSources.byTightIsolationMVArun2017v1DBoldDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2017v1", "_WPEff60")
199  tauIDSources.byVTightIsolationMVArun2017v1DBoldDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2017v1", "_WPEff50")
200  tauIDSources.byVVTightIsolationMVArun2017v1DBoldDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2017v1", "_WPEff40")
201 
202 
203  if "2017v2" in self.toKeep:
204  self.tauIdDiscrMVA_2017_version = "v2"
205  self.tauIdDiscrMVA_trainings_run2_2017 = {
206  'tauIdMVAIsoDBoldDMwLT2017' : "tauIdMVAIsoDBoldDMwLT2017",
207  }
208  self.tauIdDiscrMVA_WPs_run2_2017 = {
209  'tauIdMVAIsoDBoldDMwLT2017' : {
210  'Eff95' : "DBoldDMwLTEff95",
211  'Eff90' : "DBoldDMwLTEff90",
212  'Eff80' : "DBoldDMwLTEff80",
213  'Eff70' : "DBoldDMwLTEff70",
214  'Eff60' : "DBoldDMwLTEff60",
215  'Eff50' : "DBoldDMwLTEff50",
216  'Eff40' : "DBoldDMwLTEff40"
217  }
218  }
219 
220  if not self.is_above_cmssw_version(9, 4, 5, self.debug):
221  if self.debug: print ("runTauID: not is_above_cmssw_version(9, 4, 5). Will update the list of available in DB samples to access 2017v2")
222  self.loadMVA_WPs_run2_2017()
223 
224  self.process.rerunDiscriminationByIsolationOldDMMVArun2017v2raw = patDiscriminationByIsolationMVArun2v1raw.clone(
225  PATTauProducer = cms.InputTag('slimmedTaus'),
226  Prediscriminants = noPrediscriminants,
227  loadMVAfromDB = cms.bool(True),
228  mvaName = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v2"),#RecoTauTag_tauIdMVAIsoDBoldDMwLT2016v1 writeTauIdDiscrMVAs
229  mvaOpt = cms.string("DBoldDMwLTwGJ"),
230  verbosity = cms.int32(0)
231  )
232 
233  self.process.rerunDiscriminationByIsolationOldDMMVArun2017v2 = patDiscriminationByIsolationMVArun2v1.clone(
234  PATTauProducer = cms.InputTag('slimmedTaus'),
235  Prediscriminants = noPrediscriminants,
236  toMultiplex = cms.InputTag('rerunDiscriminationByIsolationOldDMMVArun2017v2raw'),
237  loadMVAfromDB = cms.bool(True),
238  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v2_mvaOutput_normalization"), #writeTauIdDiscrMVAoutputNormalizations
239  mapping = cms.VPSet(
240  cms.PSet(
241  category = cms.uint32(0),
242  cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v2"), #writeTauIdDiscrWPs
243  variable = cms.string("pt"),
244  )
245  ),
246  workingPoints = cms.vstring(
247  "_WPEff95",
248  "_WPEff90",
249  "_WPEff80",
250  "_WPEff70",
251  "_WPEff60",
252  "_WPEff50",
253  "_WPEff40"
254  ),
255  verbosity = cms.int32(0)
256  )
257 
258  self.rerunIsolationOldDMMVArun2017v2Task = cms.Task(
259  self.process.rerunDiscriminationByIsolationOldDMMVArun2017v2raw,
260  self.process.rerunDiscriminationByIsolationOldDMMVArun2017v2
261  )
262  self.process.rerunMvaIsolationTask.add(self.rerunIsolationOldDMMVArun2017v2Task)
263  self.process.rerunMvaIsolationSequence += cms.Sequence(self.rerunIsolationOldDMMVArun2017v2Task)
264 
265  tauIDSources.byIsolationMVArun2017v2DBoldDMwLTraw2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2017v2", "raw")
266  tauIDSources.byVVLooseIsolationMVArun2017v2DBoldDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2017v2", "_WPEff95")
267  tauIDSources.byVLooseIsolationMVArun2017v2DBoldDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2017v2", "_WPEff90")
268  tauIDSources.byLooseIsolationMVArun2017v2DBoldDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2017v2", "_WPEff80")
269  tauIDSources.byMediumIsolationMVArun2017v2DBoldDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2017v2", "_WPEff70")
270  tauIDSources.byTightIsolationMVArun2017v2DBoldDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2017v2", "_WPEff60")
271  tauIDSources.byVTightIsolationMVArun2017v2DBoldDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2017v2", "_WPEff50")
272  tauIDSources.byVVTightIsolationMVArun2017v2DBoldDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2017v2", "_WPEff40")
273 
274  if "newDM2017v2" in self.toKeep:
275  self.tauIdDiscrMVA_2017_version = "v2"
276  self.tauIdDiscrMVA_trainings_run2_2017 = {
277  'tauIdMVAIsoDBnewDMwLT2017' : "tauIdMVAIsoDBnewDMwLT2017",
278  }
279  self.tauIdDiscrMVA_WPs_run2_2017 = {
280  'tauIdMVAIsoDBnewDMwLT2017' : {
281  'Eff95' : "DBnewDMwLTEff95",
282  'Eff90' : "DBnewDMwLTEff90",
283  'Eff80' : "DBnewDMwLTEff80",
284  'Eff70' : "DBnewDMwLTEff70",
285  'Eff60' : "DBnewDMwLTEff60",
286  'Eff50' : "DBnewDMwLTEff50",
287  'Eff40' : "DBnewDMwLTEff40"
288  }
289  }
290 
291  if not self.is_above_cmssw_version(9, 4, 5, self.debug):
292  if self.debug: print ("runTauID: not is_above_cmssw_version(9, 4, 5). Will update the list of available in DB samples to access newDM2017v2")
293  self.loadMVA_WPs_run2_2017()
294 
295  self.process.rerunDiscriminationByIsolationNewDMMVArun2017v2raw = patDiscriminationByIsolationMVArun2v1raw.clone(
296  PATTauProducer = cms.InputTag('slimmedTaus'),
297  Prediscriminants = noPrediscriminants,
298  loadMVAfromDB = cms.bool(True),
299  mvaName = cms.string("RecoTauTag_tauIdMVAIsoDBnewDMwLT2017v2"),#RecoTauTag_tauIdMVAIsoDBoldDMwLT2016v1 writeTauIdDiscrMVAs
300  mvaOpt = cms.string("DBnewDMwLTwGJ"),
301  verbosity = cms.int32(0)
302  )
303 
304  self.process.rerunDiscriminationByIsolationNewDMMVArun2017v2 = patDiscriminationByIsolationMVArun2v1.clone(
305  PATTauProducer = cms.InputTag('slimmedTaus'),
306  Prediscriminants = noPrediscriminants,
307  toMultiplex = cms.InputTag('rerunDiscriminationByIsolationNewDMMVArun2017v2raw'),
308  loadMVAfromDB = cms.bool(True),
309  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAIsoDBnewDMwLT2017v2_mvaOutput_normalization"), #writeTauIdDiscrMVAoutputNormalizations
310  mapping = cms.VPSet(
311  cms.PSet(
312  category = cms.uint32(0),
313  cut = cms.string("RecoTauTag_tauIdMVAIsoDBnewDMwLT2017v2"), #writeTauIdDiscrWPs
314  variable = cms.string("pt"),
315  )
316  ),
317  workingPoints = cms.vstring(
318  "_WPEff95",
319  "_WPEff90",
320  "_WPEff80",
321  "_WPEff70",
322  "_WPEff60",
323  "_WPEff50",
324  "_WPEff40"
325  ),
326  verbosity = cms.int32(0)
327  )
328 
329  self.rerunIsolationNewDMMVArun2017v2Task = cms.Task(
330  self.process.rerunDiscriminationByIsolationNewDMMVArun2017v2raw,
331  self.process.rerunDiscriminationByIsolationNewDMMVArun2017v2
332  )
333  self.process.rerunMvaIsolationTask.add(self.rerunIsolationNewDMMVArun2017v2Task)
334  self.process.rerunMvaIsolationSequence += cms.Sequence(self.rerunIsolationNewDMMVArun2017v2Task)
335 
336  tauIDSources.byIsolationMVArun2017v2DBnewDMwLTraw2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationNewDMMVArun2017v2", "raw")
337  tauIDSources.byVVLooseIsolationMVArun2017v2DBnewDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationNewDMMVArun2017v2", "_WPEff95")
338  tauIDSources.byVLooseIsolationMVArun2017v2DBnewDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationNewDMMVArun2017v2", "_WPEff90")
339  tauIDSources.byLooseIsolationMVArun2017v2DBnewDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationNewDMMVArun2017v2", "_WPEff80")
340  tauIDSources.byMediumIsolationMVArun2017v2DBnewDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationNewDMMVArun2017v2", "_WPEff70")
341  tauIDSources.byTightIsolationMVArun2017v2DBnewDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationNewDMMVArun2017v2", "_WPEff60")
342  tauIDSources.byVTightIsolationMVArun2017v2DBnewDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationNewDMMVArun2017v2", "_WPEff50")
343  tauIDSources.byVVTightIsolationMVArun2017v2DBnewDMwLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationNewDMMVArun2017v2", "_WPEff40")
344 
345  if "dR0p32017v2" in self.toKeep:
346  self.tauIdDiscrMVA_2017_version = "v2"
347  self.tauIdDiscrMVA_trainings_run2_2017 = {
348  'tauIdMVAIsoDBoldDMdR0p3wLT2017' : "tauIdMVAIsoDBoldDMdR0p3wLT2017",
349  }
350  self.tauIdDiscrMVA_WPs_run2_2017 = {
351  'tauIdMVAIsoDBoldDMdR0p3wLT2017' : {
352  'Eff95' : "DBoldDMdR0p3wLTEff95",
353  'Eff90' : "DBoldDMdR0p3wLTEff90",
354  'Eff80' : "DBoldDMdR0p3wLTEff80",
355  'Eff70' : "DBoldDMdR0p3wLTEff70",
356  'Eff60' : "DBoldDMdR0p3wLTEff60",
357  'Eff50' : "DBoldDMdR0p3wLTEff50",
358  'Eff40' : "DBoldDMdR0p3wLTEff40"
359  }
360  }
361 
362  if not self.is_above_cmssw_version(9, 4, 5, self.debug):
363  if self.debug: print ("runTauID: not is_above_cmssw_version(9, 4, 5). Will update the list of available in DB samples to access dR0p32017v2")
364  self.loadMVA_WPs_run2_2017()
365 
366  self.process.rerunDiscriminationByIsolationOldDMdR0p3MVArun2017v2raw = patDiscriminationByIsolationMVArun2v1raw.clone(
367  PATTauProducer = cms.InputTag('slimmedTaus'),
368  Prediscriminants = noPrediscriminants,
369  loadMVAfromDB = cms.bool(True),
370  mvaName = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMdR0p3wLT2017v2"),
371  mvaOpt = cms.string("DBoldDMwLTwGJ"),
372  srcChargedIsoPtSum = cms.string('chargedIsoPtSumdR03'),
373  srcFootprintCorrection = cms.string('footprintCorrectiondR03'),
374  srcNeutralIsoPtSum = cms.string('neutralIsoPtSumdR03'),
375  srcPhotonPtSumOutsideSignalCone = cms.string('photonPtSumOutsideSignalConedR03'),
376  verbosity = cms.int32(0)
377  )
378 
379  self.process.rerunDiscriminationByIsolationOldDMdR0p3MVArun2017v2= patDiscriminationByIsolationMVArun2v1.clone(
380  PATTauProducer = cms.InputTag('slimmedTaus'),
381  Prediscriminants = noPrediscriminants,
382  toMultiplex = cms.InputTag('rerunDiscriminationByIsolationOldDMdR0p3MVArun2017v2raw'),
383  loadMVAfromDB = cms.bool(True),
384  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMdR0p3wLT2017v2_mvaOutput_normalization"), #writeTauIdDiscrMVAoutputNormalizations
385  mapping = cms.VPSet(
386  cms.PSet(
387  category = cms.uint32(0),
388  cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMdR0p3wLT2017v2"), #writeTauIdDiscrWPs
389  variable = cms.string("pt"),
390  )
391  ),
392  workingPoints = cms.vstring(
393  "_WPEff95",
394  "_WPEff90",
395  "_WPEff80",
396  "_WPEff70",
397  "_WPEff60",
398  "_WPEff50",
399  "_WPEff40"
400  ),
401  verbosity = cms.int32(0)
402  )
403 
404  self.rerunIsolationOldDMdR0p3MVArun2017v2Task = cms.Task(
405  self.process.rerunDiscriminationByIsolationOldDMdR0p3MVArun2017v2raw,
406  self.process.rerunDiscriminationByIsolationOldDMdR0p3MVArun2017v2
407  )
408  self.process.rerunMvaIsolationTask.add(self.rerunIsolationOldDMdR0p3MVArun2017v2Task)
409  self.process.rerunMvaIsolationSequence += cms.Sequence(self.rerunIsolationOldDMdR0p3MVArun2017v2Task)
410 
411  tauIDSources.byIsolationMVArun2017v2DBoldDMdR0p3wLTraw2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMdR0p3MVArun2017v2", "raw")
412  tauIDSources.byVVLooseIsolationMVArun2017v2DBoldDMdR0p3wLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMdR0p3MVArun2017v2", "_WPEff95")
413  tauIDSources.byVLooseIsolationMVArun2017v2DBoldDMdR0p3wLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMdR0p3MVArun2017v2", "_WPEff90")
414  tauIDSources.byLooseIsolationMVArun2017v2DBoldDMdR0p3wLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMdR0p3MVArun2017v2", "_WPEff80")
415  tauIDSources.byMediumIsolationMVArun2017v2DBoldDMdR0p3wLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMdR0p3MVArun2017v2", "_WPEff70")
416  tauIDSources.byTightIsolationMVArun2017v2DBoldDMdR0p3wLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMdR0p3MVArun2017v2", "_WPEff60")
417  tauIDSources.byVTightIsolationMVArun2017v2DBoldDMdR0p3wLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMdR0p3MVArun2017v2", "_WPEff50")
418  tauIDSources.byVVTightIsolationMVArun2017v2DBoldDMdR0p3wLT2017 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMdR0p3MVArun2017v2", "_WPEff40")
419 
420  # 2016 training strategy(v2) - essentially the same as 2017 training strategy (v1), trained on 2016MC, old DM - currently not implemented in the tau sequence of any release
421  # self.process.rerunDiscriminationByIsolationOldDMMVArun2v2raw = patDiscriminationByIsolationMVArun2v1raw.clone(
422  # PATTauProducer = cms.InputTag('slimmedTaus'),
423  # Prediscriminants = noPrediscriminants,
424  # loadMVAfromDB = cms.bool(True),
425  # mvaName = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2016v2"),#RecoTauTag_tauIdMVAIsoDBoldDMwLT2016v1 writeTauIdDiscrMVAs
426  # mvaOpt = cms.string("DBoldDMwLTwGJ"),
427  # verbosity = cms.int32(0)
428  # )
429  # #
430  # self.process.rerunDiscriminationByIsolationOldDMMVArun2v2VLoose = patDiscriminationByIsolationMVArun2v1VLoose.clone(
431  # PATTauProducer = cms.InputTag('slimmedTaus'),
432  # Prediscriminants = noPrediscriminants,
433  # toMultiplex = cms.InputTag('rerunDiscriminationByIsolationOldDMMVArun2v2raw'),
434  # key = cms.InputTag('rerunDiscriminationByIsolationOldDMMVArun2v2raw:category'),#?
435  # loadMVAfromDB = cms.bool(True),
436  # mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2016v2_mvaOutput_normalization"), #writeTauIdDiscrMVAoutputNormalizations
437  # mapping = cms.VPSet(
438  # cms.PSet(
439  # category = cms.uint32(0),
440  # cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2016v2_WPEff90"), #writeTauIdDiscrWPs
441  # variable = cms.string("pt"),
442  # )
443  # )
444  # )
445 
446  # 2016 training strategy(v1), trained on 2016MC, old DM
447  if "2016v1" in self.toKeep:
448  self.process.rerunDiscriminationByIsolationOldDMMVArun2v1raw = patDiscriminationByIsolationMVArun2v1raw.clone(
449  PATTauProducer = cms.InputTag('slimmedTaus'),
450  Prediscriminants = noPrediscriminants,
451  loadMVAfromDB = cms.bool(True),
452  mvaName = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2016v1"),
453  mvaOpt = cms.string("DBoldDMwLT"),
454  verbosity = cms.int32(0)
455  )
456 
457  self.process.rerunDiscriminationByIsolationOldDMMVArun2v1 = patDiscriminationByIsolationMVArun2v1.clone(
458  PATTauProducer = cms.InputTag('slimmedTaus'),
459  Prediscriminants = noPrediscriminants,
460  toMultiplex = cms.InputTag('rerunDiscriminationByIsolationOldDMMVArun2v1raw'),
461  loadMVAfromDB = cms.bool(True),
462  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2016v1_mvaOutput_normalization"),
463  mapping = cms.VPSet(
464  cms.PSet(
465  category = cms.uint32(0),
466  cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2016v1"),
467  variable = cms.string("pt"),
468  )
469  ),
470  workingPoints = cms.vstring(
471  "_WPEff90",
472  "_WPEff80",
473  "_WPEff70",
474  "_WPEff60",
475  "_WPEff50",
476  "_WPEff40"
477  )
478  )
479 
480  self.rerunIsolationOldDMMVArun2016v1Task = cms.Task(
481  self.process.rerunDiscriminationByIsolationOldDMMVArun2v1raw,
482  self.process.rerunDiscriminationByIsolationOldDMMVArun2v1
483  )
484  self.process.rerunMvaIsolationTask.add(self.rerunIsolationOldDMMVArun2016v1Task)
485  self.process.rerunMvaIsolationSequence += cms.Sequence(self.rerunIsolationOldDMMVArun2016v1Task)
486 
487  tauIDSources.byIsolationMVArun2v1DBoldDMwLTraw2016 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2v1", "raw")
488  tauIDSources.byVLooseIsolationMVArun2v1DBoldDMwLT2016 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2v1", "_WPEff90")
489  tauIDSources.byLooseIsolationMVArun2v1DBoldDMwLT2016 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2v1", "_WPEff80")
490  tauIDSources.byMediumIsolationMVArun2v1DBoldDMwLT2016 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2v1", "_WPEff70")
491  tauIDSources.byTightIsolationMVArun2v1DBoldDMwLT2016 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2v1", "_WPEff60")
492  tauIDSources.byVTightIsolationMVArun2v1DBoldDMwLT2016 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2v1", "_WPEff50")
493  tauIDSources.byVVTightIsolationMVArun2v1DBoldDMwLT2016 = self.tauIDMVAinputs("rerunDiscriminationByIsolationOldDMMVArun2v1", "_WPEff40")
494 
495  # 2016 training strategy(v1), trained on 2016MC, new DM
496  if "newDM2016v1" in self.toKeep:
497  self.process.rerunDiscriminationByIsolationNewDMMVArun2v1raw = patDiscriminationByIsolationMVArun2v1raw.clone(
498  PATTauProducer = cms.InputTag('slimmedTaus'),
499  Prediscriminants = noPrediscriminants,
500  loadMVAfromDB = cms.bool(True),
501  mvaName = cms.string("RecoTauTag_tauIdMVAIsoDBnewDMwLT2016v1"),
502  mvaOpt = cms.string("DBnewDMwLT"),
503  verbosity = cms.int32(0)
504  )
505 
506  self.process.rerunDiscriminationByIsolationNewDMMVArun2v1 = patDiscriminationByIsolationMVArun2v1.clone(
507  PATTauProducer = cms.InputTag('slimmedTaus'),
508  Prediscriminants = noPrediscriminants,
509  toMultiplex = cms.InputTag('rerunDiscriminationByIsolationNewDMMVArun2v1raw'),
510  loadMVAfromDB = cms.bool(True),
511  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAIsoDBnewDMwLT2016v1_mvaOutput_normalization"),
512  mapping = cms.VPSet(
513  cms.PSet(
514  category = cms.uint32(0),
515  cut = cms.string("RecoTauTag_tauIdMVAIsoDBnewDMwLT2016v1_WPEff90"),
516  variable = cms.string("pt"),
517  )
518  ),
519  workingPoints = cms.vstring(
520  "_WPEff90",
521  "_WPEff80",
522  "_WPEff70",
523  "_WPEff60",
524  "_WPEff50",
525  "_WPEff40"
526  )
527  )
528 
529  self.rerunIsolationNewDMMVArun2016v1Task = cms.Task(
530  self.process.rerunDiscriminationByIsolationNewDMMVArun2v1raw,
531  self.process.rerunDiscriminationByIsolationNewDMMVArun2v1
532  )
533  self.process.rerunMvaIsolationTask.add(self.rerunIsolationNewDMMVArun2016v1Task)
534  self.process.rerunMvaIsolationSequence += cms.Sequence(self.rerunIsolationNewDMMVArun2016v1Task)
535 
536  tauIDSources.byIsolationMVArun2v1DBnewDMwLTraw2016 = self.tauIDMVAinputs("rerunDiscriminationByIsolationNewDMMVArun2v1", "raw")
537  tauIDSources.byVLooseIsolationMVArun2v1DBnewDMwLT2016 = self.tauIDMVAinputs("rerunDiscriminationByIsolationNewDMMVArun2v1", "_WPEff90")
538  tauIDSources.byLooseIsolationMVArun2v1DBnewDMwLT2016 = self.tauIDMVAinputs("rerunDiscriminationByIsolationNewDMMVArun2v1", "_WPEff80")
539  tauIDSources.byMediumIsolationMVArun2v1DBnewDMwLT2016 = self.tauIDMVAinputs("rerunDiscriminationByIsolationNewDMMVArun2v1", "_WPEff70")
540  tauIDSources.byTightIsolationMVArun2v1DBnewDMwLT2016 = self.tauIDMVAinputs("rerunDiscriminationByIsolationNewDMMVArun2v1", "_WPEff60")
541  tauIDSources.byVTightIsolationMVArun2v1DBnewDMwLT2016 = self.tauIDMVAinputs("rerunDiscriminationByIsolationNewDMMVArun2v1", "_WPEff50")
542  tauIDSources.byVVTightIsolationMVArun2v1DBnewDMwLT2016 = self.tauIDMVAinputs("rerunDiscriminationByIsolationNewDMMVArun2v1", "_WPEff40")
543 
544  if "deepTau2017v1" in self.toKeep:
545  if self.debug: print ("Adding DeepTau IDs")
546 
547  workingPoints_ = {
548  "e": {
549  "VVVLoose" : 0.96424,
550  "VVLoose" : 0.98992,
551  "VLoose" : 0.99574,
552  "Loose": 0.99831,
553  "Medium": 0.99868,
554  "Tight": 0.99898,
555  "VTight": 0.99911,
556  "VVTight": 0.99918
557  },
558  "mu": {
559  "VVVLoose" : 0.959619,
560  "VVLoose" : 0.997687,
561  "VLoose" : 0.999392,
562  "Loose": 0.999755,
563  "Medium": 0.999854,
564  "Tight": 0.999886,
565  "VTight": 0.999944,
566  "VVTight": 0.9999971
567  },
568 
569  "jet": {
570  "VVVLoose" : 0.5329,
571  "VVLoose" : 0.7645,
572  "VLoose" : 0.8623,
573  "Loose": 0.9140,
574  "Medium": 0.9464,
575  "Tight": 0.9635,
576  "VTight": 0.9760,
577  "VVTight": 0.9859
578  }
579  }
580  file_names = ['RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v1_20L1024N_quantized.pb']
581  self.process.deepTau2017v1 = cms.EDProducer("DeepTauId",
582  electrons = cms.InputTag('slimmedElectrons'),
583  muons = cms.InputTag('slimmedMuons'),
584  taus = cms.InputTag('slimmedTaus'),
585  pfcands = cms.InputTag('packedPFCandidates'),
586  vertices = cms.InputTag('offlineSlimmedPrimaryVertices'),
587  rho = cms.InputTag('fixedGridRhoAll'),
588  graph_file = cms.vstring(file_names),
589  mem_mapped = cms.bool(False),
590  version = cms.uint32(self.getDeepTauVersion(file_names[0])[1]),
591  debug_level = cms.int32(0),
592  disable_dxy_pca = cms.bool(False)
593  )
594 
595  self.processDeepProducer('deepTau2017v1', tauIDSources, workingPoints_)
596 
597  self.process.rerunMvaIsolationTask.add(self.process.deepTau2017v1)
598  self.process.rerunMvaIsolationSequence += self.process.deepTau2017v1
599 
600  if "deepTau2017v2" in self.toKeep:
601  if self.debug: print ("Adding DeepTau IDs")
602 
603  workingPoints_ = {
604  "e": {
605  "VVVLoose": 0.0630386,
606  "VVLoose": 0.1686942,
607  "VLoose": 0.3628130,
608  "Loose": 0.6815435,
609  "Medium": 0.8847544,
610  "Tight": 0.9675541,
611  "VTight": 0.9859251,
612  "VVTight": 0.9928449,
613  },
614  "mu": {
615  "VLoose": 0.1058354,
616  "Loose": 0.2158633,
617  "Medium": 0.5551894,
618  "Tight": 0.8754835,
619  },
620  "jet": {
621  "VVVLoose": 0.2599605,
622  "VVLoose": 0.4249705,
623  "VLoose": 0.5983682,
624  "Loose": 0.7848675,
625  "Medium": 0.8834768,
626  "Tight": 0.9308689,
627  "VTight": 0.9573137,
628  "VVTight": 0.9733927,
629  },
630  }
631 
632  file_names = [
633  'core:RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v2p6_e6_core.pb',
634  'inner:RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v2p6_e6_inner.pb',
635  'outer:RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v2p6_e6_outer.pb',
636  ]
637  self.process.deepTau2017v2 = cms.EDProducer("DeepTauId",
638  electrons = cms.InputTag('slimmedElectrons'),
639  muons = cms.InputTag('slimmedMuons'),
640  taus = cms.InputTag('slimmedTaus'),
641  pfcands = cms.InputTag('packedPFCandidates'),
642  vertices = cms.InputTag('offlineSlimmedPrimaryVertices'),
643  rho = cms.InputTag('fixedGridRhoAll'),
644  graph_file = cms.vstring(file_names),
645  mem_mapped = cms.bool(False),
646  version = cms.uint32(self.getDeepTauVersion(file_names[0])[1]),
647  debug_level = cms.int32(0),
648  disable_dxy_pca = cms.bool(False)
649  )
650 
651  self.processDeepProducer('deepTau2017v2', tauIDSources, workingPoints_)
652 
653  self.process.rerunMvaIsolationTask.add(self.process.deepTau2017v2)
654  self.process.rerunMvaIsolationSequence += self.process.deepTau2017v2
655 
656  if "deepTau2017v2p1" in self.toKeep:
657  if self.debug: print ("Adding DeepTau IDs")
658 
659  workingPoints_ = {
660  "e": {
661  "VVVLoose": 0.0630386,
662  "VVLoose": 0.1686942,
663  "VLoose": 0.3628130,
664  "Loose": 0.6815435,
665  "Medium": 0.8847544,
666  "Tight": 0.9675541,
667  "VTight": 0.9859251,
668  "VVTight": 0.9928449,
669  },
670  "mu": {
671  "VLoose": 0.1058354,
672  "Loose": 0.2158633,
673  "Medium": 0.5551894,
674  "Tight": 0.8754835,
675  },
676  "jet": {
677  "VVVLoose": 0.2599605,
678  "VVLoose": 0.4249705,
679  "VLoose": 0.5983682,
680  "Loose": 0.7848675,
681  "Medium": 0.8834768,
682  "Tight": 0.9308689,
683  "VTight": 0.9573137,
684  "VVTight": 0.9733927,
685  },
686  }
687 
688  file_names = [
689  'core:RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v2p6_e6_core.pb',
690  'inner:RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v2p6_e6_inner.pb',
691  'outer:RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v2p6_e6_outer.pb',
692  ]
693  self.process.deepTau2017v2p1 = cms.EDProducer("DeepTauId",
694  electrons = cms.InputTag('slimmedElectrons'),
695  muons = cms.InputTag('slimmedMuons'),
696  taus = cms.InputTag('slimmedTaus'),
697  pfcands = cms.InputTag('packedPFCandidates'),
698  vertices = cms.InputTag('offlineSlimmedPrimaryVertices'),
699  rho = cms.InputTag('fixedGridRhoAll'),
700  graph_file = cms.vstring(file_names),
701  mem_mapped = cms.bool(False),
702  version = cms.uint32(self.getDeepTauVersion(file_names[0])[1]),
703  debug_level = cms.int32(0),
704  disable_dxy_pca = cms.bool(True)
705  )
706 
707  self.processDeepProducer('deepTau2017v2p1', tauIDSources, workingPoints_)
708 
709  self.process.rerunMvaIsolationTask.add(self.process.deepTau2017v2p1)
710  self.process.rerunMvaIsolationSequence += self.process.deepTau2017v2p1
711 
712  if "DPFTau_2016_v0" in self.toKeep:
713  if self.debug: print ("Adding DPFTau isolation (v0)")
714 
715  workingPoints_ = {
716  "all": {
717  "Tight" : "if(decayMode == 0) return (0.898328 - 0.000160992 * pt);" + \
718  "if(decayMode == 1) return (0.910138 - 0.000229923 * pt);" + \
719  "if(decayMode == 10) return (0.873958 - 0.0002328 * pt);" + \
720  "return 99.0;"
721  #"Tight" : "? decayMode == 0 ? (0.898328 - 0.000160992 * pt) : " +
722  # "(? decayMode == 1 ? 0.910138 - 0.000229923 * pt : " +
723  # "(? decayMode == 10 ? (0.873958 - 0.0002328 * pt) : 1))"
724  # "Tight" : "(decayMode == 0) * (0.898328 - 0.000160992 * pt) + \
725  # (decayMode == 1) * (0.910138 - 0.000229923 * pt) + \
726  # (decayMode == 10) * (0.873958 - 0.0002328 * pt) "
727  }
728  }
729  file_names = [ 'RecoTauTag/TrainingFiles/data/DPFTauId/DPFIsolation_2017v0_quantized.pb' ]
730  self.process.dpfTau2016v0 = cms.EDProducer("DPFIsolation",
731  pfcands = cms.InputTag('packedPFCandidates'),
732  taus = cms.InputTag('slimmedTaus'),
733  vertices = cms.InputTag('offlineSlimmedPrimaryVertices'),
734  graph_file = cms.vstring(file_names),
735  version = cms.uint32(self.getDpfTauVersion(file_names[0])),
736  mem_mapped = cms.bool(False)
737  )
738 
739  self.processDeepProducer('dpfTau2016v0', tauIDSources, workingPoints_)
740 
741  self.process.rerunMvaIsolationTask.add(self.process.dpfTau2016v0)
742  self.process.rerunMvaIsolationSequence += self.process.dpfTau2016v0
743 
744 
745  if "DPFTau_2016_v1" in self.toKeep:
746  print ("Adding DPFTau isolation (v1)")
747  print ("WARNING: WPs are not defined for DPFTau_2016_v1")
748  print ("WARNING: The score of DPFTau_2016_v1 is inverted: i.e. for Sig->0, for Bkg->1 with -1 for undefined input (preselection not passed).")
749 
750  workingPoints_ = {
751  "all": {"Tight" : 0.123} #FIXME: define WP
752  }
753 
754  file_names = [ 'RecoTauTag/TrainingFiles/data/DPFTauId/DPFIsolation_2017v1_quantized.pb' ]
755  self.process.dpfTau2016v1 = cms.EDProducer("DPFIsolation",
756  pfcands = cms.InputTag('packedPFCandidates'),
757  taus = cms.InputTag('slimmedTaus'),
758  vertices = cms.InputTag('offlineSlimmedPrimaryVertices'),
759  graph_file = cms.vstring(file_names),
760  version = cms.uint32(self.getDpfTauVersion(file_names[0])),
761  mem_mapped = cms.bool(False)
762  )
763 
764  self.processDeepProducer('dpfTau2016v1', tauIDSources, workingPoints_)
765 
766  self.process.rerunMvaIsolationTask.add(self.process.dpfTau2016v1)
767  self.process.rerunMvaIsolationSequence += self.process.dpfTau2016v1
768 
769  if "againstEle2018" in self.toKeep:
770  antiElectronDiscrMVA6_version = "MVA6v3_noeveto"
771 
773  from RecoTauTag.RecoTau.PATTauDiscriminationAgainstElectronMVA6_cfi import patTauDiscriminationAgainstElectronMVA6
774  self.process.patTauDiscriminationByElectronRejectionMVA62018Raw = patTauDiscriminationAgainstElectronMVA6.clone(
775  Prediscriminants = noPrediscriminants, #already selected for MiniAOD
776  vetoEcalCracks = cms.bool(False), #keep taus in EB-EE cracks
777  mvaName_NoEleMatch_wGwoGSF_BL = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_wGwoGSF_BL',
778  mvaName_NoEleMatch_wGwoGSF_EC = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_wGwoGSF_EC',
779  mvaName_NoEleMatch_woGwoGSF_BL = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_woGwoGSF_BL',
780  mvaName_NoEleMatch_woGwoGSF_EC = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_woGwoGSF_EC',
781  mvaName_wGwGSF_BL = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_wGwGSF_BL',
782  mvaName_wGwGSF_EC = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_wGwGSF_EC',
783  mvaName_woGwGSF_BL = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_woGwGSF_BL',
784  mvaName_woGwGSF_EC = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_woGwGSF_EC'
785  )
786 
787  from RecoTauTag.RecoTau.PATTauDiscriminantCutMultiplexer_cfi import patTauDiscriminantCutMultiplexer
788  self.process.patTauDiscriminationByElectronRejectionMVA62018 = patTauDiscriminantCutMultiplexer.clone(
789  PATTauProducer = self.process.patTauDiscriminationByElectronRejectionMVA62018Raw.PATTauProducer,
790  Prediscriminants = self.process.patTauDiscriminationByElectronRejectionMVA62018Raw.Prediscriminants,
791  toMultiplex = cms.InputTag("patTauDiscriminationByElectronRejectionMVA62018Raw"),
792  mapping = cms.VPSet(
793  cms.PSet(
794  category = cms.uint32(0),
795  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_woGwoGSF_BL'),
796  variable = cms.string('pt')
797  ),
798  cms.PSet(
799  category = cms.uint32(2),
800  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_wGwoGSF_BL'),
801  variable = cms.string('pt')
802  ),
803  cms.PSet(
804  category = cms.uint32(5),
805  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_woGwGSF_BL'),
806  variable = cms.string('pt')
807  ),
808  cms.PSet(
809  category = cms.uint32(7),
810  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_wGwGSF_BL'),
811  variable = cms.string('pt')
812  ),
813  cms.PSet(
814  category = cms.uint32(8),
815  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_woGwoGSF_EC'),
816  variable = cms.string('pt')
817  ),
818  cms.PSet(
819  category = cms.uint32(10),
820  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_wGwoGSF_EC'),
821  variable = cms.string('pt')
822  ),
823  cms.PSet(
824  category = cms.uint32(13),
825  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_woGwGSF_EC'),
826  variable = cms.string('pt')
827  ),
828  cms.PSet(
829  category = cms.uint32(15),
830  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_wGwGSF_EC'),
831  variable = cms.string('pt')
832  )
833  ),
834  workingPoints = cms.vstring(
835  "_WPeff98",
836  "_WPeff90",
837  "_WPeff80",
838  "_WPeff70",
839  "_WPeff60"
840  )
841  )
842 
843  self.process.patTauDiscriminationByElectronRejectionMVA62018Task = cms.Task(
844  self.process.patTauDiscriminationByElectronRejectionMVA62018Raw,
845  self.process.patTauDiscriminationByElectronRejectionMVA62018
846  )
847  self.process.patTauDiscriminationByElectronRejectionMVA62018Seq = cms.Sequence(self.process.patTauDiscriminationByElectronRejectionMVA62018Task)
848  self.process.rerunMvaIsolationTask.add(self.process.patTauDiscriminationByElectronRejectionMVA62018Task)
849  self.process.rerunMvaIsolationSequence += self.process.patTauDiscriminationByElectronRejectionMVA62018Seq
850 
851  _againstElectronTauIDSources = cms.PSet(
852  againstElectronMVA6Raw2018 = self.tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62018", "raw"),
853  againstElectronMVA6category2018 = self.tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62018", "category"),
854  againstElectronVLooseMVA62018 = self.tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62018", "_WPeff98"),
855  againstElectronLooseMVA62018 = self.tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62018", "_WPeff90"),
856  againstElectronMediumMVA62018 = self.tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62018", "_WPeff80"),
857  againstElectronTightMVA62018 = self.tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62018", "_WPeff70"),
858  againstElectronVTightMVA62018 = self.tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62018", "_WPeff60")
859  )
860  _tauIDSourcesWithAgainistEle = cms.PSet(
861  tauIDSources.clone(),
862  _againstElectronTauIDSources
863  )
864  tauIDSources =_tauIDSourcesWithAgainistEle.clone()
865 
866 
867  if self.debug: print('Embedding new TauIDs into \"'+self.updatedTauName+'\"')
868  if not hasattr(self.process, self.updatedTauName):
869  embedID = cms.EDProducer("PATTauIDEmbedder",
870  src = cms.InputTag('slimmedTaus'),
871  tauIDSources = tauIDSources
872  )
873  setattr(self.process, self.updatedTauName, embedID)
874  else: #assume same type
875  tauIDSources = cms.PSet(
876  getattr(self.process, self.updatedTauName).tauIDSources,
877  tauIDSources)
878  getattr(self.process, self.updatedTauName).tauIDSources = tauIDSources
879 
880 

References DigiComparisonTask.debug, TestTask.debug, TPComparisonTask.debug, HcalOfflineHarvesting.debug, HcalOnlineHarvesting.debug, HFRaddamTask.debug, LaserTask.debug, QIE10Task.debug, QIE11Task.debug, NoCQTask.debug, PedestalTask.debug, RecHitTask.debug, UMNioTask.debug, ZDCTask.debug, RawTask.debug, TPTask.debug, DigiTask.debug, LEDTask.debug, InterpolationDebug.debug, runTauIdMVA.TauIDEmbedder.debug, DTDigiToRawModule.debug, CSCRPCData.debug, CSCTMBScope.debug, CSCDCCUnpacker.debug, DTDigiToRaw.debug, ALIUtils.debug, magneticfield::eSector.debug, magneticfield::bRod.debug, CSCSegAlgoPreClustering.debug, DTSegment4DT0Corrector.debug, RPCPointProducer.debug, DTRecHitProducer.debug, DTRecSegment4DProducer.debug, crabFunctions.CrabController.debug, MuonSeedProducer.debug, QCDSingleJetFilter.debug, DTSegmentsTask.debug, HiggsTo2GammaSkim.debug, HiggsToZZ4LeptonsSkimEff.debug, magneticfield::bSector.debug, DTOccupancyEfficiency.debug, HiggsToZZ4LeptonsPreFilter.debug, DTTTrigCorrectionFirst.debug, HiggsToZZ4LeptonsSkim.debug, DTTPDeadWriter.debug, DTDDUUnpacker.debug, pkg.AbstractPkg.debug, DTRecSegment2DProducer.debug, DTTTrigWriter.debug, magneticfield::bSlab.debug, JetAnaPythia< Jet >.debug, DTRecSegment2DExtendedProducer.debug, SiPixelRawToDigi.debug, DTT0CalibrationRMS.debug, MuScleFitFilter.debug, CSCDCCEventData.debug, DTNoiseComputation.debug, CSCAnodeLCTAnalyzer.debug, CSCCathodeLCTAnalyzer.debug, magneticfield::bLayer.debug, CSCSegAlgoShowering.debug, DTOccupancyPoint.debug, MuScleFitPlotter.debug, GEMCSCSegAlgoRR.debug, DTTTrigSyncT0Only.debug, DTROS25Unpacker.debug, util.rrapi.RRApi.debug, rrapi.RRApi.debug, DTSpyReader.debug, DTEfficiencyTask.debug, DTT0Calibration.debug, ME0SegmentAlgorithm.debug, DTTTrigCalibration.debug, DTRunConditionVar.debug, PythiaFilterEMJetHeep.debug, HeavyChHiggsToTauNuSkim.debug, GEMSegmentAlgorithm.debug, CSCDDUEventData.debug, DTChamberEfficiencyTask.debug, DTMeantimerPatternReco4D.debug, HCALResponse.debug, DTCombinatorialPatternReco4D.debug, DTRefitAndCombineReco4D.debug, DTClusterer.debug, DTChamberEfficiency.debug, FCDTask.debug, CSCCLCTData.debug, MuonSeedCreator.debug, DTTMax.debug, DTLinearDriftAlgo.debug, CSCTimingExtractor.debug, DTTTrigSyncFromDB.debug, DTVDriftCalibration.debug, MuonSeedCleaner.debug, CSCTMBData.debug, DTParametrizedDriftAlgo.debug, DTNoDriftAlgo.debug, DTCombinatorialPatternReco.debug, MagGeoBuilderFromDDD.debug, PixelDataFormatter.debug, DTTimingExtractor.debug, DTMeantimerPatternReco.debug, DTTTrigSyncTOFCorr.debug, DTCombinatorialExtendedPatternReco.debug, MuonSeedBuilder.debug, DTLinearDriftFromDBAlgo.debug, DTSegmentUpdator.debug, CSCTMBHeader.debug, CSCSegAlgoDF.debug, CSCEventData.debug, MuScleFitUtils.debug, BaseParticlePropagator.debug, CSCTriggerPrimitivesReader.debug, magneticfield::BaseVolumeHandle.debug, CSCSegAlgoST.debug, CSCALCTTrailer.debug, CSCALCTHeader.debug, notcub::CachingHostAllocator.debug, notcub::CachingDeviceAllocator.debug, EcalBoundaryInfoCalculator< EcalDetId >.debug, crabFunctions.CrabTask.debug, Pythia8::PowhegHooksBB4L.debug, HltDiff.debug, runTauIdMVA.TauIDEmbedder.is_above_cmssw_version(), runTauIdMVA.TauIDEmbedder.loadMVA_WPs_run2_2017(), edm::ProductLabels.process, runTauIdMVA.TauIDEmbedder.process, DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, cscdqm::HWStandbyType.process, DTTtrigWorkflow.DTttrigWorkflow.process, EgammaHLTValidationUtils.EgammaDQMModuleMaker.process, Config.Process.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, JsonOutputProducer::JsonConfigurationBlock.process, Config.TestModuleCommand.process, runTauIdMVA.TauIDEmbedder.tauIdDiscrMVA_2017_version, runTauIdMVA.TauIDEmbedder.tauIdDiscrMVA_trainings_run2_2017, runTauIdMVA.TauIDEmbedder.tauIdDiscrMVA_WPs_run2_2017, and runTauIdMVA.TauIDEmbedder.toKeep.

◆ tauIDMVAinputs()

def runTauIdMVA.TauIDEmbedder.tauIDMVAinputs (   self,
  module,
  wp 
)

◆ versionToInt()

def runTauIdMVA.TauIDEmbedder.versionToInt (   release = 9,
  subversion = 4,
  patch = 0,
  debug = False 
)
static

Definition at line 77 of file runTauIdMVA.py.

77  def versionToInt(release=9, subversion=4, patch=0, debug = False):
78  version = release * 10000 + subversion * 100 + patch + 1 # shifted by one to account for pre-releases.
79  if debug: print ("versionToInt:", version)
80  return version
81 
82 

Member Data Documentation

◆ availableDiscriminators

runTauIdMVA.TauIDEmbedder.availableDiscriminators
static

Definition at line 11 of file runTauIdMVA.py.

◆ debug

runTauIdMVA.TauIDEmbedder.debug

◆ process

runTauIdMVA.TauIDEmbedder.process

◆ rerunIsolationNewDMMVArun2016v1Task

runTauIdMVA.TauIDEmbedder.rerunIsolationNewDMMVArun2016v1Task

Definition at line 529 of file runTauIdMVA.py.

◆ rerunIsolationNewDMMVArun2017v2Task

runTauIdMVA.TauIDEmbedder.rerunIsolationNewDMMVArun2017v2Task

Definition at line 329 of file runTauIdMVA.py.

◆ rerunIsolationOldDMdR0p3MVArun2017v2Task

runTauIdMVA.TauIDEmbedder.rerunIsolationOldDMdR0p3MVArun2017v2Task

Definition at line 404 of file runTauIdMVA.py.

◆ rerunIsolationOldDMMVArun2016v1Task

runTauIdMVA.TauIDEmbedder.rerunIsolationOldDMMVArun2016v1Task

Definition at line 480 of file runTauIdMVA.py.

◆ rerunIsolationOldDMMVArun2017v1Task

runTauIdMVA.TauIDEmbedder.rerunIsolationOldDMMVArun2017v1Task

Definition at line 186 of file runTauIdMVA.py.

◆ rerunIsolationOldDMMVArun2017v2Task

runTauIdMVA.TauIDEmbedder.rerunIsolationOldDMMVArun2017v2Task

Definition at line 258 of file runTauIdMVA.py.

◆ tauIdDiscrMVA_2017_version

runTauIdMVA.TauIDEmbedder.tauIdDiscrMVA_2017_version

◆ tauIdDiscrMVA_trainings_run2_2017

runTauIdMVA.TauIDEmbedder.tauIdDiscrMVA_trainings_run2_2017

◆ tauIdDiscrMVA_WPs_run2_2017

runTauIdMVA.TauIDEmbedder.tauIdDiscrMVA_WPs_run2_2017

◆ toKeep

runTauIdMVA.TauIDEmbedder.toKeep

Definition at line 38 of file runTauIdMVA.py.

Referenced by runTauIdMVA.TauIDEmbedder.runTauID().

◆ updatedTauName

runTauIdMVA.TauIDEmbedder.updatedTauName

Definition at line 22 of file runTauIdMVA.py.

taus_updatedMVAIds_cff.tauIDMVAinputs
def tauIDMVAinputs(module, wp)
Definition: taus_updatedMVAIds_cff.py:310
relativeConstraints.keys
keys
Definition: relativeConstraints.py:89
cms::dd::split
std::vector< std::string_view > split(std::string_view, const char *)
mps_monitormerge.items
list items
Definition: mps_monitormerge.py:29
PATTauDiscriminantCutMultiplexer_cfi
str
#define str(s)
Definition: TestProcessor.cc:48
svgfig.load
def load(fileName)
Definition: svgfig.py:547
createfilelist.int
int
Definition: createfilelist.py:10
edm::print
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
format
pileupCalc.upper
upper
Definition: pileupCalc.py:214