Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-03-19 23:41:01

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from CommonTools.ParticleFlow.goodOfflinePrimaryVertices_cfi import *
0004 from CommonTools.ParticleFlow.pfMET_cfi  import *
0005 from CommonTools.ParticleFlow.pfJets_cff import *
0006 from CommonTools.ParticleFlow.pfTaus_cff import *
0007 from CommonTools.ParticleFlow.ParticleSelectors.pfMuonsFromVertex_cfi import pfMuonsFromVertex
0008 from CommonTools.ParticleFlow.ParticleSelectors.pfElectronsFromVertex_cfi import pfElectronsFromVertex
0009 from CommonTools.ParticleFlow.pfNoPileUp_cff  import *
0010 from CommonTools.ParticleFlow.pfNoPileUpJME_cff  import *
0011 
0012 
0013 # sequential top projection cleaning
0014 from CommonTools.ParticleFlow.TopProjectors.pfNoMuon_cfi import *
0015 from CommonTools.ParticleFlow.TopProjectors.pfNoElectron_cfi import *
0016 from CommonTools.ParticleFlow.TopProjectors.pfNoJet_cfi import *
0017 from CommonTools.ParticleFlow.TopProjectors.pfNoTau_cfi import *
0018 
0019 
0020 # b-tagging
0021 from RecoBTag.ImpactParameter.pfImpactParameterTagInfos_cfi import pfImpactParameterTagInfos
0022 from RecoBTag.SecondaryVertex.pfInclusiveSecondaryVertexFinderTagInfos_cfi import pfInclusiveSecondaryVertexFinderTagInfos
0023 from RecoBTag.SecondaryVertex.candidateCombinedSecondaryVertexV2Computer_cfi import candidateCombinedSecondaryVertexV2Computer
0024 from RecoBTag.SecondaryVertex.pfCombinedInclusiveSecondaryVertexV2BJetTags_cfi import pfCombinedInclusiveSecondaryVertexV2BJetTags
0025 
0026 
0027 #### PU Again... need to do this twice because the "linking" stage of PF reco ####
0028 #### condenses information into the new "particleFlow" collection.            ####
0029 
0030 
0031 pfPileUpEI   = pfPileUp.clone( PFCandidates = 'particleFlowPtrs' )
0032 pfNoPileUpEI = pfNoPileUp.clone( bottomCollection = 'particleFlowPtrs',
0033                                  topCollection = 'pfPileUpEI' )
0034 
0035 pfPileUpJMEEI   = pfPileUpJME.clone( PFCandidates = 'particleFlowPtrs' )
0036 pfNoPileUpJMEEI = pfNoPileUpJME.clone( bottomCollection = 'particleFlowPtrs',
0037                                        topCollection = 'pfPileUpJMEEI' )
0038 
0039 
0040 #### Muons ####
0041 
0042 pfAllMuonsEI = cms.EDFilter(
0043     "PFCandidateFwdPtrCollectionStringFilter",
0044     src = cms.InputTag("pfNoPileUpEI"),
0045     cut = cms.string("abs(pdgId())==13"
0046         ),
0047     makeClones = cms.bool(True)
0048 )
0049 
0050 pfMuonsFromVertexEI = pfMuonsFromVertex.clone( src = 'pfAllMuonsEI' )
0051 
0052 pfIsolatedMuonsEI = cms.EDFilter(
0053     "PFCandidateFwdPtrCollectionStringFilter",
0054     src = cms.InputTag("pfMuonsFromVertexEI"),
0055     cut = cms.string('''abs(eta)<2.5 && pt>10. && muonRef.isAvailable() &&
0056     (muonRef.pfIsolationR04().sumChargedHadronPt+
0057     max(0.,muonRef.pfIsolationR04().sumNeutralHadronEt+
0058     muonRef.pfIsolationR04().sumPhotonEt-
0059     0.50*muonRef.pfIsolationR04().sumPUPt))/pt < 0.20 &&
0060     (muonRef.isPFMuon && (muonRef.isGlobalMuon || muonRef.isTrackerMuon) )'''
0061     ),
0062     makeClones = cms.bool(True)
0063 )
0064 
0065 
0066 
0067 pfNoMuon.topCollection    = 'pfIsolatedMuonsEI'
0068 pfNoMuon.bottomCollection = 'pfNoPileUpEI'
0069 
0070 
0071 pfNoMuonJME.topCollection    = 'pfIsolatedMuonsEI'
0072 pfNoMuonJME.bottomCollection = 'pfNoPileUpJMEEI'
0073 
0074 
0075 
0076 #### Electrons ####
0077 
0078 pfAllElectronsEI = cms.EDFilter(
0079     "PFCandidateFwdPtrCollectionStringFilter",
0080     src = cms.InputTag("pfNoMuon"),
0081     cut = cms.string("abs(pdgId())==11"
0082         ),
0083     makeClones = cms.bool(True)
0084 )
0085 
0086 pfElectronsFromVertexEI = pfElectronsFromVertex.clone( src = 'pfAllElectronsEI' )
0087 
0088 pfIsolatedElectronsEI = cms.EDFilter(
0089     "PFCandidateFwdPtrCollectionStringFilter",
0090     src = cms.InputTag("pfElectronsFromVertexEI"),
0091     cut = cms.string('''abs(eta)<2.5 && pt>20. &&
0092     gsfTrackRef.isAvailable() &&
0093     gsfTrackRef.hitPattern().numberOfLostHits('MISSING_INNER_HITS')<2 &&
0094     (gsfElectronRef.pfIsolationVariables().sumChargedHadronPt+
0095     max(0.,gsfElectronRef.pfIsolationVariables().sumNeutralHadronEt+
0096     gsfElectronRef.pfIsolationVariables().sumPhotonEt-
0097     0.5*gsfElectronRef.pfIsolationVariables().sumPUPt))/pt < 0.15
0098     '''),
0099     makeClones = cms.bool(True)
0100 )
0101 
0102 
0103 pfNoElectron.topCollection    = 'pfIsolatedElectronsEI'
0104 pfNoElectron.bottomCollection = 'pfNoMuon'
0105 
0106 pfNoElectronJME.topCollection    = 'pfIsolatedElectronsEI'
0107 pfNoElectronJME.bottomCollection = 'pfNoMuonJME'
0108 
0109 
0110 #### Jets ####
0111 
0112 pfJetsEI = pfJets.clone()
0113 pfJetsPtrsEI = pfJetsPtrs.clone( src = "pfJetsEI" )
0114 
0115 pfJetTaskEI = cms.Task( pfJetsEI, pfJetsPtrsEI )
0116 pfJetSequenceEI = cms.Sequence( pfJetTaskEI )
0117 
0118 pfNoJetEI = pfNoJet.clone(
0119     topCollection = 'pfJetsPtrsEI',
0120     bottomCollection = 'pfNoElectronJME'
0121 )
0122 
0123 #### Taus ####
0124 pfTausEI = pfTaus.clone()
0125 pfTausPtrsEI = pfTausPtrs.clone( src = "pfTausEI" )
0126 pfNoTauEI = pfNoTau.clone(
0127     topCollection = 'pfTausPtrsEI',
0128     bottomCollection = 'pfJetsPtrsEI'
0129 )
0130 
0131 pfTauEITask = cms.Task(
0132     pfTausPreTask,
0133     pfTausBaseTask,
0134     pfTausEI,
0135     pfTausPtrsEI
0136     )
0137 pfTauEISequence = cms.Sequence(pfTauEITask)
0138 
0139 #### B-tagging ####
0140 pfImpactParameterTagInfosEI = pfImpactParameterTagInfos.clone(
0141     jets =  'pfJetsEI'
0142 )
0143 pfInclusiveSecondaryVertexFinderTagInfosEI = pfInclusiveSecondaryVertexFinderTagInfos.clone(
0144     trackIPTagInfos =  'pfImpactParameterTagInfosEI'
0145 )
0146 pfCombinedInclusiveSecondaryVertexV2BJetTagsEI = pfCombinedInclusiveSecondaryVertexV2BJetTags.clone(
0147     tagInfos = ["pfImpactParameterTagInfosEI",
0148                 "pfInclusiveSecondaryVertexFinderTagInfosEI"]
0149 )
0150 
0151 
0152 
0153 #### MET ####
0154 pfMetEI = pfMET.clone(srcJets="pfJetsEI")
0155 
0156 #EITopPAG = cms.Task(
0157 EITask = cms.Task(
0158     goodOfflinePrimaryVertices ,
0159     pfPileUpEI ,
0160     pfPileUpJMEEI ,
0161     pfNoPileUpEI ,
0162     pfNoPileUpJMEEI ,
0163     pfAllMuonsEI ,
0164     pfMuonsFromVertexEI ,
0165     pfIsolatedMuonsEI ,
0166     pfNoMuon ,
0167     pfNoMuonJME ,
0168     pfAllElectronsEI ,
0169     pfElectronsFromVertexEI ,
0170     pfIsolatedElectronsEI ,
0171     pfNoElectron ,
0172     pfNoElectronJME ,
0173     pfJetTaskEI ,
0174     pfNoJetEI ,
0175     pfTauEITask ,
0176     pfNoTauEI ,
0177     pfMetEI,
0178     pfImpactParameterTagInfosEI,
0179     pfInclusiveSecondaryVertexFinderTagInfosEI,
0180     pfCombinedInclusiveSecondaryVertexV2BJetTagsEI
0181     )
0182 EIsequence = cms.Sequence(EITask)
0183