CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes
adaptToRunAtMiniAOD.adaptToRunAtMiniAOD Class Reference
Inheritance diagram for adaptToRunAtMiniAOD.adaptToRunAtMiniAOD:

Public Member Functions

def __init__
 
def adaptTauToMiniAODReReco
 
def addTauReReco
 
def convertModuleToMiniAODInput
 
def setOutputModule
 

Public Attributes

 miniAODTausTask
 
 postfix
 
 process
 
 runBoosted
 

Static Public Attributes

 addAssociatedTracks = False,
 
 addBTagInfo = False,
 
 addDiscriminators = False,
 
 addGenJetMatch = False,
 
 addGenPartonMatch = False,
 
 addJetCharge = False,
 
 addJetCorrFactors = False,
 
 addJetFlavourInfo = False,
 
 deltaR = self.process.recoTauAK4PFJets08Region.deltaR,
 
list discriminatorSources = []
 
 embedGenPartonMatch = False,
 
 getJetMCFlavour = False,
 
tuple idLabel = cms.string('ByLooseMuonRejectionSimple')
 
tuple inst = m.group(0)
 
string jetCollection = 'slimmedJets'
 
string jetCollInstanceName = 'subJetsForSeedingBoostedTausPAT'
 
list jetCorrFactorsSource = []
 
string jetSource = "ak4PFJetsPAT"
 
tuple m = re.search(r'_[A-Za-z0-9]+_\*', prod)
 
 maxJetAbsEta = self.process.recoTauAK4PFJets08Region.maxJetAbsEta,
 
 minJetPt = self.process.recoTauAK4PFJets08Region.minJetPt,
 
tuple output
 
tuple pfCandAssocMapSrc = cms.InputTag("")
 
tuple pfCandidateSrc = cms.InputTag('packedPFCandidates')
 
tuple pfCandSrc = cms.InputTag("packedPFCandidates")
 
string PFTauProducer = "hpsPFTauProducer"
 
tuple PFTauTag = cms.InputTag("hpsPFTauProducer"+self.postfix)
 
tuple provenanceConfigLabel = cms.string('IDWPdefinitions')
 
string src = 'packedPFCandidates'
 
tuple src = cms.InputTag(jetCollection)
 
tuple subjetSrc = cms.InputTag('ca8PFJetsCHSprunedForBoostedTausPAT'+self.postfix,'subJetsForSeedingBoostedTausPAT')
 
tuple tauIdEmbedder
 
list toKeep = ['againstEle2018']
 
tuple verbosity = cms.int32(0)
 

Static Private Attributes

tuple _chargedHadronProducer = getattr(self.process,'ak4PFJetsRecoTauChargedHadrons'+self.postfix)
 
tuple _combinatoricRecoTauProducer = getattr(self.process,'combinatoricRecoTaus'+self.postfix)
 
tuple _jetRegionProducer = getattr(self.process,'recoTauAK4Jets08RegionPAT'+self.postfix)
 
tuple _modifiersToRemove = cms.VPSet()
 
string _noUpdatedTauName = 'selectedPatTausNoNewIDs'
 
tuple _patTauProducer = getattr(self.process,'patTaus'+self.postfix)
 PAT part in the following. More...
 
tuple _piZeroProducer = getattr(self.process,'ak4PFJetsLegacyHPSPiZeros'+self.postfix)
 
tuple _tauIDAntiMuSimple = getattr(self.process,'hpsPFTauDiscriminationByMuonRejectionSimple'+self.postfix)
 
tuple _tauPVProducer = getattr(self.process,'hpsPFTauPrimaryVertexProducer'+self.postfix)
 
string _updatedTauName = 'selectedPatTausNewIDs'
 

Detailed Description

Definition at line 12 of file adaptToRunAtMiniAOD.py.

Constructor & Destructor Documentation

def adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.__init__ (   self,
  process,
  runBoosted = False,
  postfix = "" 
)

Definition at line 13 of file adaptToRunAtMiniAOD.py.

13 
14  def __init__(self, process, runBoosted=False, postfix=""):
15  self.process = process
16  self.runBoosted = runBoosted
17  self.postfix = postfix
18  if runBoosted:
19  self.postfix = 'Boosted'+postfix
20  #print("Adapting boosted tau reconstruction to run at miniAOD; postfix = \"%s\"" % self.postfix)
21  #else:
22  # print("Adapting tau reconstruction to run at miniAOD; postfix = \"%s\"" % self.postfix)

Member Function Documentation

def adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.adaptTauToMiniAODReReco (   self,
  reclusterJets = True 
)

Definition at line 54 of file adaptToRunAtMiniAOD.py.

54 
def adaptTauToMiniAODReReco(self,reclusterJets=True):
def adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.addTauReReco (   self)

Definition at line 24 of file adaptToRunAtMiniAOD.py.

24 
25  def addTauReReco(self):
26  #PAT
27  self.process.load('PhysicsTools.PatAlgos.producersLayer1.tauProducer_cff')
28  self.process.load('PhysicsTools.PatAlgos.selectionLayer1.tauSelector_cfi')
29  self.process.selectedPatTaus.cut="pt > 18. && tauID(\'decayModeFindingNewDMs\')> 0.5" #Cut as in MiniAOD
30  #Tau RECO
31  self.process.load("RecoTauTag.Configuration.RecoPFTauTag_cff")
32  #Task/Sequence for tau rereco
33  self.process.miniAODTausTask = cms.Task(
34  self.process.PFTauTask,
35  self.process.makePatTausTask,
36  self.process.selectedPatTaus
37  )
38  self.miniAODTausTask = configtools.cloneProcessingSnippetTask(
39  self.process,self.process.miniAODTausTask,postfix=self.postfix)
40  setattr(self.process,'miniAODTausSequence'+self.postfix,cms.Sequence(self.miniAODTausTask))
41  if not self.postfix=="":
42  del self.process.miniAODTausTask
def adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.convertModuleToMiniAODInput (   self,
  name 
)

Definition at line 44 of file adaptToRunAtMiniAOD.py.

References edm::ProductLabels.process, adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.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, and Config.TestModuleCommand.process.

44 
45  def convertModuleToMiniAODInput(self,name):
46  module = getattr(self.process, name)
47  if hasattr(module, 'particleFlowSrc'):
48  module.particleFlowSrc = cms.InputTag("packedPFCandidates", "", "")
49  if hasattr(module, 'vertexSrc'):
50  module.vertexSrc = cms.InputTag('offlineSlimmedPrimaryVertices')
51  if hasattr(module, 'qualityCuts') and hasattr(module.qualityCuts, 'primaryVertexSrc'):
52  module.qualityCuts.primaryVertexSrc = cms.InputTag('offlineSlimmedPrimaryVertices')
def adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.setOutputModule (   self,
  mode = 0 
)

Definition at line 260 of file adaptToRunAtMiniAOD.py.

def setOutputModule(self,mode=0):

Member Data Documentation

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD._chargedHadronProducer = getattr(self.process,'ak4PFJetsRecoTauChargedHadrons'+self.postfix)
staticprivate

Definition at line 138 of file adaptToRunAtMiniAOD.py.

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD._combinatoricRecoTauProducer = getattr(self.process,'combinatoricRecoTaus'+self.postfix)
staticprivate

Definition at line 151 of file adaptToRunAtMiniAOD.py.

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD._jetRegionProducer = getattr(self.process,'recoTauAK4Jets08RegionPAT'+self.postfix)
staticprivate

Definition at line 120 of file adaptToRunAtMiniAOD.py.

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD._modifiersToRemove = cms.VPSet()
staticprivate

Definition at line 162 of file adaptToRunAtMiniAOD.py.

string adaptToRunAtMiniAOD.adaptToRunAtMiniAOD._noUpdatedTauName = 'selectedPatTausNoNewIDs'
staticprivate

Definition at line 233 of file adaptToRunAtMiniAOD.py.

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD._patTauProducer = getattr(self.process,'patTaus'+self.postfix)
staticprivate

PAT part in the following.

Definition at line 214 of file adaptToRunAtMiniAOD.py.

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD._piZeroProducer = getattr(self.process,'ak4PFJetsLegacyHPSPiZeros'+self.postfix)
staticprivate

Definition at line 132 of file adaptToRunAtMiniAOD.py.

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD._tauIDAntiMuSimple = getattr(self.process,'hpsPFTauDiscriminationByMuonRejectionSimple'+self.postfix)
staticprivate

Definition at line 202 of file adaptToRunAtMiniAOD.py.

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD._tauPVProducer = getattr(self.process,'hpsPFTauPrimaryVertexProducer'+self.postfix)
staticprivate

Definition at line 178 of file adaptToRunAtMiniAOD.py.

string adaptToRunAtMiniAOD.adaptToRunAtMiniAOD._updatedTauName = 'selectedPatTausNewIDs'
staticprivate

Definition at line 232 of file adaptToRunAtMiniAOD.py.

adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.addAssociatedTracks = False,
static

Definition at line 89 of file adaptToRunAtMiniAOD.py.

adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.addBTagInfo = False,
static

Definition at line 86 of file adaptToRunAtMiniAOD.py.

adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.addDiscriminators = False,
static

Definition at line 87 of file adaptToRunAtMiniAOD.py.

adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.addGenJetMatch = False,
static

Definition at line 93 of file adaptToRunAtMiniAOD.py.

adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.addGenPartonMatch = False,
static

Definition at line 91 of file adaptToRunAtMiniAOD.py.

adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.addJetCharge = False,
static

Definition at line 90 of file adaptToRunAtMiniAOD.py.

adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.addJetCorrFactors = False,
static

Definition at line 84 of file adaptToRunAtMiniAOD.py.

adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.addJetFlavourInfo = False,
static

Definition at line 95 of file adaptToRunAtMiniAOD.py.

adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.deltaR = self.process.recoTauAK4PFJets08Region.deltaR,
static

Definition at line 113 of file adaptToRunAtMiniAOD.py.

list adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.discriminatorSources = []
static

Definition at line 88 of file adaptToRunAtMiniAOD.py.

adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.embedGenPartonMatch = False,
static

Definition at line 92 of file adaptToRunAtMiniAOD.py.

adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.getJetMCFlavour = False,
static

Definition at line 94 of file adaptToRunAtMiniAOD.py.

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.idLabel = cms.string('ByLooseMuonRejectionSimple')
static

Definition at line 223 of file adaptToRunAtMiniAOD.py.

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.inst = m.group(0)
static

Definition at line 291 of file adaptToRunAtMiniAOD.py.

string adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.jetCollection = 'slimmedJets'
static

Definition at line 57 of file adaptToRunAtMiniAOD.py.

string adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.jetCollInstanceName = 'subJetsForSeedingBoostedTausPAT'
static

Definition at line 64 of file adaptToRunAtMiniAOD.py.

list adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.jetCorrFactorsSource = []
static

Definition at line 85 of file adaptToRunAtMiniAOD.py.

string adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.jetSource = "ak4PFJetsPAT"
static

Definition at line 83 of file adaptToRunAtMiniAOD.py.

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.m = re.search(r'_[A-Za-z0-9]+_\*', prod)
static

Definition at line 289 of file adaptToRunAtMiniAOD.py.

adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.maxJetAbsEta = self.process.recoTauAK4PFJets08Region.maxJetAbsEta,
static

Definition at line 114 of file adaptToRunAtMiniAOD.py.

adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.miniAODTausTask

Definition at line 37 of file adaptToRunAtMiniAOD.py.

adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.minJetPt = self.process.recoTauAK4PFJets08Region.minJetPt,
static

Definition at line 115 of file adaptToRunAtMiniAOD.py.

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.output
static
Initial value:
1 = cms.OutputModule(
2  'PoolOutputModule',
3  fileName=cms.untracked.string('miniAOD_TauReco.root'),
4  fastCloning=cms.untracked.bool(False),
5  dataset=cms.untracked.PSet(
6  dataTier=cms.untracked.string('MINIAODSIM'),
7  filterName=cms.untracked.string('')
8  ),
9  outputCommands = evtContent.MINIAODSIMEventContent.outputCommands,
10  SelectEvents=cms.untracked.PSet(
11  SelectEvents=cms.vstring('*',)
12  )
13  )

Definition at line 265 of file adaptToRunAtMiniAOD.py.

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.pfCandAssocMapSrc = cms.InputTag("")
static

Definition at line 116 of file adaptToRunAtMiniAOD.py.

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.pfCandidateSrc = cms.InputTag('packedPFCandidates')
static

Definition at line 69 of file adaptToRunAtMiniAOD.py.

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.pfCandSrc = cms.InputTag("packedPFCandidates")
static

Definition at line 117 of file adaptToRunAtMiniAOD.py.

string adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.PFTauProducer = "hpsPFTauProducer"
static

Definition at line 201 of file adaptToRunAtMiniAOD.py.

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.PFTauTag = cms.InputTag("hpsPFTauProducer"+self.postfix)
static

Definition at line 187 of file adaptToRunAtMiniAOD.py.

adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.postfix

Definition at line 16 of file adaptToRunAtMiniAOD.py.

Referenced by runTauIdMVA.TauIDEmbedder.processDeepProducer(), and runTauIdMVA.TauIDEmbedder.runTauID().

adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.process

Definition at line 14 of file adaptToRunAtMiniAOD.py.

Referenced by adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.convertModuleToMiniAODInput(), runTauIdMVA.TauIDEmbedder.processDeepProducer(), runTauIdMVA.TauIDEmbedder.runTauID(), and runTauIdMVA.TauIDEmbedder.tauIDMVAinputs().

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.provenanceConfigLabel = cms.string('IDWPdefinitions')
static

Definition at line 222 of file adaptToRunAtMiniAOD.py.

adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.runBoosted

Definition at line 15 of file adaptToRunAtMiniAOD.py.

string adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.src = 'packedPFCandidates'
static

Definition at line 63 of file adaptToRunAtMiniAOD.py.

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.src = cms.InputTag(jetCollection)
static

Definition at line 118 of file adaptToRunAtMiniAOD.py.

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.subjetSrc = cms.InputTag('ca8PFJetsCHSprunedForBoostedTausPAT'+self.postfix,'subJetsForSeedingBoostedTausPAT')
static

Definition at line 68 of file adaptToRunAtMiniAOD.py.

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.tauIdEmbedder
static
Initial value:
1 = tauIdConfig.TauIDEmbedder(
2  self.process, debug = False,
3  originalTauName = _noUpdatedTauName,
4  updatedTauName = _updatedTauName,
5  postfix = "MiniAODTaus"+self.postfix,
6  toKeep = toKeep
7  )

Definition at line 238 of file adaptToRunAtMiniAOD.py.

list adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.toKeep = ['againstEle2018']
static

Definition at line 234 of file adaptToRunAtMiniAOD.py.

Referenced by runTauIdMVA.TauIDEmbedder.runTauID().

tuple adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.verbosity = cms.int32(0)
static

Definition at line 70 of file adaptToRunAtMiniAOD.py.