Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-09 00:51:19

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 patTaus = cms.EDProducer("PATTauProducer",
0004     # input
0005     tauSource = cms.InputTag("hpsPFTauProducer"),
0006     tauTransverseImpactParameterSource = cms.InputTag("hpsPFTauTransverseImpactParameters"),
0007 
0008     # add user data
0009     userData = cms.PSet(
0010       # add custom classes here
0011       userClasses = cms.PSet(
0012         src = cms.VInputTag('')
0013       ),
0014       # add doubles here
0015       userFloats = cms.PSet(
0016         src = cms.VInputTag('')
0017       ),
0018       # add ints here
0019       userInts = cms.PSet(
0020         src = cms.VInputTag('')
0021       ),
0022       # add candidate ptrs here
0023       userCands = cms.PSet(
0024         src = cms.VInputTag('')
0025       ),
0026       # add "inline" functions here
0027       userFunctions = cms.vstring(),
0028       userFunctionLabels = cms.vstring()
0029     ),
0030 
0031     # jet energy corrections
0032     addTauJetCorrFactors = cms.bool(False),
0033     tauJetCorrFactorsSource = cms.VInputTag(cms.InputTag("patTauJetCorrFactors")),
0034 
0035     # embedding objects (for Calo- and PFTaus)
0036     embedLeadTrack = cms.bool(False), ## embed in AOD externally stored leading track
0037     embedSignalTracks = cms.bool(False), ## embed in AOD externally stored signal tracks
0038     embedIsolationTracks = cms.bool(False), ## embed in AOD externally stored isolation tracks
0039     # embedding objects (for PFTaus only)
0040     embedLeadPFCand = cms.bool(False), ## embed in AOD externally stored leading PFCandidate
0041     embedLeadPFChargedHadrCand = cms.bool(False), ## embed in AOD externally stored leading PFChargedHadron candidate
0042     embedLeadPFNeutralCand = cms.bool(False), ## embed in AOD externally stored leading PFNeutral Candidate
0043     embedSignalPFCands = cms.bool(False), ## embed in AOD externally stored signal PFCandidates
0044     embedSignalPFChargedHadrCands = cms.bool(False), ## embed in AOD externally stored signal PFChargedHadronCandidates
0045     embedSignalPFNeutralHadrCands = cms.bool(False), ## embed in AOD externally stored signal PFNeutralHadronCandidates
0046     embedSignalPFGammaCands = cms.bool(False), ## embed in AOD externally stored signal PFGammaCandidates
0047     embedIsolationPFCands = cms.bool(False), ## embed in AOD externally stored isolation PFCandidates
0048     embedIsolationPFChargedHadrCands = cms.bool(False), ## embed in AOD externally stored isolation PFChargedHadronCandidates
0049     embedIsolationPFNeutralHadrCands = cms.bool(False), ## embed in AOD externally stored isolation PFNeutralHadronCandidates
0050     embedIsolationPFGammaCands = cms.bool(False), ## embed in AOD externally stored isolation PFGammaCandidates
0051 
0052     # embed IsoDeposits
0053     isoDeposits = cms.PSet(),
0054 
0055     # user defined isolation variables the variables defined here will be accessible
0056     # via pat::Tau::userIsolation(IsolationKeys key) with the key as defined in
0057     # DataFormats/PatCandidates/interface/Isolation.h
0058     userIsolation = cms.PSet(),
0059 
0060     # tau ID (for efficiency studies)
0061     addTauID     = cms.bool(True),
0062     tauIDSources = cms.PSet(),
0063     # IDs added below
0064 
0065     skipMissingTauID = cms.bool(False), #Allow to skip a tau ID variable when not present in the event"
0066     # mc matching configurables
0067     addGenMatch      = cms.bool(True),
0068     embedGenMatch    = cms.bool(True),
0069     genParticleMatch = cms.InputTag("tauMatch"),
0070     addGenJetMatch   = cms.bool(True),
0071     embedGenJetMatch = cms.bool(True),
0072     genJetMatch      = cms.InputTag("tauGenJetMatch"),
0073 
0074     # efficiencies
0075     addEfficiencies = cms.bool(False),
0076     efficiencies    = cms.PSet(),
0077 
0078     # resolution
0079     addResolutions  = cms.bool(False),
0080     resolutions     = cms.PSet()
0081 )
0082 
0083 # helper functions for ID configuration
0084 def singleID(pset, inputID, label):
0085     setattr(pset, label, cms.PSet(inputTag=cms.InputTag(inputID), provenanceConfigLabel=cms.string(""), idLabel=cms.string("")))
0086 def containerID(pset, inputID, provCfgLabel, wps):
0087     for wp in wps:
0088         setattr(pset, wp[0], cms.PSet(inputTag=cms.InputTag(inputID), provenanceConfigLabel=cms.string(provCfgLabel), idLabel=cms.string(wp[1])))
0089 
0090 # configure many IDs
0091 # you can comment out those you don't want to save some disk space
0092 singleID(patTaus.tauIDSources, "hpsPFTauDiscriminationByDecayModeFinding", "decayModeFinding")
0093 singleID(patTaus.tauIDSources, "hpsPFTauDiscriminationByDecayModeFindingNewDMs", "decayModeFindingNewDMs")
0094 containerID(patTaus.tauIDSources, "hpsPFTauDiscriminationByMuonRejection3", "IDWPdefinitions", [
0095     ["againstMuonLoose3", "ByLooseMuonRejection3"],
0096     ["againstMuonTight3", "ByTightMuonRejection3"]
0097     ])
0098 containerID(patTaus.tauIDSources, "hpsPFTauBasicDiscriminators", "IDdefinitions", [
0099     ["chargedIsoPtSum", "ChargedIsoPtSum"],
0100     ["neutralIsoPtSum", "NeutralIsoPtSum"],
0101     ["puCorrPtSum", "PUcorrPtSum"],
0102     ["neutralIsoPtSumWeight", "NeutralIsoPtSumWeight"],
0103     ["footprintCorrection", "TauFootprintCorrection"],
0104     ["photonPtSumOutsideSignalCone", "PhotonPtSumOutsideSignalCone"],
0105     ["byCombinedIsolationDeltaBetaCorrRaw3Hits", "ByRawCombinedIsolationDBSumPtCorr3Hits"]
0106     ])
0107 containerID(patTaus.tauIDSources, "hpsPFTauBasicDiscriminators", "IDWPdefinitions", [
0108     ["byLooseCombinedIsolationDeltaBetaCorr3Hits", "ByLooseCombinedIsolationDBSumPtCorr3Hits"],
0109     ["byMediumCombinedIsolationDeltaBetaCorr3Hits", "ByMediumCombinedIsolationDBSumPtCorr3Hits"],
0110     ["byTightCombinedIsolationDeltaBetaCorr3Hits", "ByTightCombinedIsolationDBSumPtCorr3Hits"],
0111     ["byPhotonPtSumOutsideSignalCone", "ByPhotonPtSumOutsideSignalCone"]
0112     ])
0113 containerID(patTaus.tauIDSources, "hpsPFTauBasicDiscriminatorsdR03", "IDdefinitions", [
0114     ["chargedIsoPtSumdR03", "ChargedIsoPtSumdR03"],
0115     ["neutralIsoPtSumdR03", "NeutralIsoPtSumdR03"],
0116     ["neutralIsoPtSumWeightdR03", "NeutralIsoPtSumWeightdR03"],
0117     ["footprintCorrectiondR03", "TauFootprintCorrectiondR03"],
0118     ["photonPtSumOutsideSignalConedR03", "PhotonPtSumOutsideSignalConedR03"]
0119     ])
0120 singleID(patTaus.tauIDSources, "hpsPFTauDiscriminationByDeadECALElectronRejection", "againstElectronDeadECAL")