Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-26 04:08:58

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # getting the ptrs
0004 from RecoParticleFlow.PFProducer.pfLinker_cff import particleFlowPtrs
0005 
0006 from CommonTools.ParticleFlow.pfPileUp_cfi import *
0007 from CommonTools.ParticleFlow.TopProjectors.pfNoPileUp_cfi import *
0008 pfPileUpIsoPFBRECO = pfPileUp.clone( PFCandidates = 'particleFlowPtrs' )
0009 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0010 pp_on_AA.toModify(pfPileUpIsoPFBRECO, enable = False)
0011 
0012 pfNoPileUpIsoPFBRECO = pfNoPileUp.clone( topCollection = 'pfPileUpIsoPFBRECO',
0013                                          bottomCollection = 'particleFlowPtrs')
0014 pfNoPileUpIsoPFBRECOTask = cms.Task(
0015     pfPileUpIsoPFBRECO,
0016     pfNoPileUpIsoPFBRECO
0017     )
0018 pfNoPileUpIsoPFBRECOSequence = cms.Sequence(pfNoPileUpIsoPFBRECOTask)
0019 
0020 from CommonTools.ParticleFlow.pfNoPileUpJME_cff import *
0021 
0022 pfPileUpPFBRECO = pfPileUp.clone( PFCandidates = 'particleFlowPtrs' )
0023 pfNoPileUpPFBRECO = pfNoPileUp.clone( topCollection = 'pfPileUpPFBRECO',
0024                                       bottomCollection = 'particleFlowPtrs')
0025 pfNoPileUpPFBRECOTask = cms.Task(
0026     pfPileUpPFBRECO,
0027     pfNoPileUpPFBRECO
0028     )
0029 pfNoPileUpPFBRECOSequence = cms.Sequence(pfNoPileUpPFBRECOTask)
0030 
0031 from CommonTools.ParticleFlow.ParticleSelectors.pfAllNeutralHadrons_cfi import *
0032 pfAllNeutralHadronsPFBRECO = pfAllNeutralHadrons.clone( src = 'pfNoPileUpIsoPFBRECO' )
0033 from CommonTools.ParticleFlow.ParticleSelectors.pfAllChargedHadrons_cfi import *
0034 pfAllChargedHadronsPFBRECO = pfAllChargedHadrons.clone( src = 'pfNoPileUpIsoPFBRECO' )
0035 from CommonTools.ParticleFlow.ParticleSelectors.pfAllPhotons_cfi import *
0036 pfAllPhotonsPFBRECO = pfAllPhotons.clone( src = 'pfNoPileUpIsoPFBRECO' )
0037 from CommonTools.ParticleFlow.ParticleSelectors.pfAllMuons_cfi import *
0038 pfAllMuonsPFBRECO = pfAllMuons.clone( src = 'pfNoPileUpPFBRECO' )
0039 pfAllMuonsClonesPFBRECO = pfAllMuonsClones.clone( src = 'pfAllMuonsPFBRECO' )
0040 from CommonTools.ParticleFlow.ParticleSelectors.pfAllElectrons_cfi import *
0041 pfAllElectronsPFBRECO = pfAllElectrons.clone( src = 'pfNoMuonPFBRECO' )
0042 pfAllElectronsClonesPFBRECO = pfAllElectronsClones.clone( src = 'pfAllElectronsPFBRECO' )
0043 from CommonTools.ParticleFlow.ParticleSelectors.pfAllChargedParticles_cfi import *
0044 pfAllChargedParticlesPFBRECO = pfAllChargedParticles.clone( src = 'pfNoPileUpIsoPFBRECO' )
0045 from CommonTools.ParticleFlow.ParticleSelectors.pfAllNeutralHadronsAndPhotons_cfi import *
0046 pfAllNeutralHadronsAndPhotonsPFBRECO = pfAllNeutralHadronsAndPhotons.clone( src = 'pfNoPileUpIsoPFBRECO' )
0047 pfPileUpAllChargedParticlesPFBRECO = pfAllChargedParticles.clone( src = 'pfPileUpIsoPFBRECO' )
0048 pfSortByTypePFBRECOTask = cms.Task(
0049     pfAllNeutralHadronsPFBRECO,
0050     pfAllChargedHadronsPFBRECO,
0051     pfAllPhotonsPFBRECO,
0052     # charged hadrons , electrons , muons
0053     pfAllChargedParticlesPFBRECO,
0054     # same, but from pile up
0055     pfPileUpAllChargedParticlesPFBRECO,
0056     pfAllNeutralHadronsAndPhotonsPFBRECO
0057 #    ,
0058 #    pfAllElectronsPFBRECO,
0059 #    pfAllMuonsPFBRECO
0060     )
0061 pfSortByTypePFBRECOSequence = cms.Sequence(pfSortByTypePFBRECOTask)
0062 
0063 pfParticleSelectionPFBRECOTask = cms.Task(
0064     pfNoPileUpIsoPFBRECOTask,
0065     # In principle JME sequence should go here, but this is used in RECO
0066     # in addition to here, and is used in the "first-step" PF process
0067     # so needs to go later.
0068     #pfNoPileUpJMETask ,
0069     pfNoPileUpPFBRECOTask,
0070     pfSortByTypePFBRECOTask
0071     )
0072 pfParticleSelectionPFBRECOSequence = cms.Sequence(pfParticleSelectionPFBRECOTask)
0073 
0074 from CommonTools.ParticleFlow.ParticleSelectors.pfSelectedPhotons_cfi import *
0075 pfSelectedPhotonsPFBRECO = pfSelectedPhotons.clone( src = 'pfAllPhotonsPFBRECO' )
0076 from CommonTools.ParticleFlow.Isolation.pfPhotonIsolationPFBRECO_cff import *
0077 from CommonTools.ParticleFlow.Isolation.pfIsolatedPhotons_cfi import *
0078 pfIsolatedPhotonsPFBRECO = pfIsolatedPhotons.clone( 
0079     src = 'pfSelectedPhotonsPFBRECO',
0080     isolationValueMapsCharged = ["phPFIsoValueCharged04PFIdPFBRECO"],
0081     isolationValueMapsNeutral = ["phPFIsoValueNeutral04PFIdPFBRECO",
0082                                  "phPFIsoValueGamma04PFIdPFBRECO"],
0083     deltaBetaIsolationValueMap = 'phPFIsoValuePU04PFIdPFBRECO' 
0084 )
0085 pfPhotonPFBRECOTask = cms.Task(
0086     pfSelectedPhotonsPFBRECO ,
0087     pfPhotonIsolationPFBRECOTask ,
0088     # selecting isolated photons:
0089     pfIsolatedPhotonsPFBRECO
0090     )
0091 pfPhotonPFBRECOSequence = cms.Sequence(pfPhotonPFBRECOTask)
0092 
0093 from CommonTools.ParticleFlow.ParticleSelectors.pfMuonsFromVertex_cfi import *
0094 pfMuonsFromVertexPFBRECO = pfMuonsFromVertex.clone( src = 'pfAllMuonsPFBRECO' )
0095 from CommonTools.ParticleFlow.Isolation.pfIsolatedMuons_cfi import *
0096 pfIsolatedMuonsPFBRECO = pfIsolatedMuons.clone( src = 'pfMuonsFromVertexPFBRECO' )
0097 pfMuonsPFBRECO = pfIsolatedMuonsPFBRECO.clone(cut = "pt > 5 & muonRef.isAvailable()")
0098 pfMuonPFBRECOTask = cms.Task(
0099     pfAllMuonsPFBRECO ,
0100     pfMuonsFromVertexPFBRECO ,
0101     pfIsolatedMuonsPFBRECO,
0102     pfMuonsPFBRECO
0103     )
0104 pfMuonPFBRECOSequence = cms.Sequence(pfMuonPFBRECOTask)
0105 
0106 from CommonTools.ParticleFlow.ParticleSelectors.pfElectronsFromVertex_cfi import *
0107 pfElectronsFromVertexPFBRECO = pfElectronsFromVertex.clone( src = 'pfAllElectronsPFBRECO' )
0108 from CommonTools.ParticleFlow.Isolation.pfIsolatedElectrons_cfi import *
0109 pfIsolatedElectronsPFBRECO = pfIsolatedElectrons.clone( src = 'pfElectronsFromVertexPFBRECO' )
0110 pfElectronsPFBRECO = pfIsolatedElectronsPFBRECO.clone( cut = " pt > 5 & gsfElectronRef.isAvailable() & gsfTrackRef.hitPattern().numberOfLostHits('MISSING_INNER_HITS')<2")
0111 pfElectronPFBRECOTask = cms.Task(
0112     pfAllElectronsPFBRECO ,
0113     pfElectronsFromVertexPFBRECO ,
0114     pfIsolatedElectronsPFBRECO ,
0115     pfElectronsPFBRECO
0116     )
0117 pfElectronPFBRECOSequence = cms.Sequence(pfElectronPFBRECOTask)
0118 
0119 from CommonTools.ParticleFlow.Tools.jetTools import jetAlgo
0120 pfJetsPFBRECO = jetAlgo('AK4')
0121 pfJetsPFBRECO.src = 'pfNoElectronJMEPFBRECO'
0122 pfJetsPtrsPFBRECO = cms.EDProducer("PFJetFwdPtrProducer",
0123                                    src=cms.InputTag("pfJetsPFBRECO")
0124                                    )
0125 pfJetPFBRECOTask = cms.Task(
0126     pfJetsPFBRECO ,
0127     pfJetsPtrsPFBRECO
0128     )
0129 pfJetPFBRECOSequence = cms.Sequence(pfJetPFBRECOTask)
0130 
0131 from CommonTools.ParticleFlow.pfTaus_cff import *
0132 
0133 from CommonTools.ParticleFlow.pfMET_cfi import *
0134 pfMETPFBRECO = pfMET.clone( srcJets = 'pfJetsPFBRECO' )
0135 
0136 ##delta beta weighting
0137 #from CommonTools.ParticleFlow.deltaBetaWeights_cfi import *
0138 #pfWeightedPhotonsPFBRECO = pfWeightedPhotons.clone( src = 'pfAllPhotonsPFBRECO',
0139                                                     #chargedFromPV = 'pfAllChargedParticlesPFBRECO',
0140                                                     #chargedFromPU = 'pfPileUpAllChargedParticlesPFBRECO' )
0141 #pfWeightedNeutralHadronsPFBRECO = pfWeightedNeutralHadrons.clone( src = 'pfAllNeutralHadronsPFBRECO',
0142                                                                   #chargedFromPV = 'pfAllChargedParticlesPFBRECO',
0143                                                                   #chargedFromPU = 'pfPileUpAllChargedParticlesPFBRECO' )
0144 #pfDeltaBetaWeightingPFBRECOTask = cms.Task(pfWeightedPhotonsPFBRECO+pfWeightedNeutralHadronsPFBRECO)
0145 #pfDeltaBetaWeightingPFBRECOSequence = cms.Sequence(pfDeltaBetaWeightingPFBRECOTask)
0146 
0147 # sequential top projection cleaning
0148 from CommonTools.ParticleFlow.TopProjectors.pfNoMuon_cfi import *
0149 pfNoMuonPFBRECO = pfNoMuon.clone( topCollection = 'pfIsolatedMuonsPFBRECO',
0150                                   bottomCollection = 'pfNoPileUpPFBRECO' )
0151 pfNoMuonJMEPFBRECO = pfNoMuonJME.clone( topCollection = 'pfIsolatedMuonsPFBRECO' )
0152 from CommonTools.ParticleFlow.TopProjectors.pfNoElectron_cfi import *
0153 pfNoElectronPFBRECO = pfNoElectron.clone( topCollection = 'pfIsolatedElectronsPFBRECO',
0154                                           bottomCollection = 'pfNoMuonPFBRECO' )
0155 pfNoElectronJMEPFBRECO = pfNoElectronJME.clone( topCollection = 'pfIsolatedElectronsPFBRECO',
0156                                                 bottomCollection = 'pfNoMuonJMEPFBRECO' )
0157 pfNoElectronJMEClonesPFBRECO = pfNoElectronJMEClones.clone( src = 'pfNoElectronJMEPFBRECO' )
0158 from CommonTools.ParticleFlow.TopProjectors.pfNoJet_cff import *
0159 pfNoJetPFBRECO = pfNoJet.clone( topCollection = 'pfJetsPtrsPFBRECO',
0160                                 bottomCollection = 'pfNoElectronJMEPFBRECO' )
0161 from CommonTools.ParticleFlow.TopProjectors.pfNoTau_cff import *
0162 pfNoTauPFBRECO = pfNoTau.clone ( bottomCollection = 'pfJetsPtrsPFBRECO' )
0163 pfNoTauClonesPFBRECO = pfNoTauClones.clone ( src = 'pfNoTauPFBRECO' )
0164 
0165 # generator tools
0166 from CommonTools.ParticleFlow.genForPF2PAT_cff import *
0167 
0168 PFBRECOTask = cms.Task(
0169     particleFlowPtrs ,
0170     pfParticleSelectionPFBRECOTask ,
0171     pfNoPileUpJMETask ,
0172 #    pfDeltaBetaWeightingPFBRECOTask ,
0173     pfPhotonPFBRECOTask ,
0174     pfMuonPFBRECOTask ,
0175     pfNoMuonPFBRECO ,
0176     pfNoMuonJMEPFBRECO ,
0177     pfElectronPFBRECOTask ,
0178     pfNoElectronPFBRECO ,
0179     pfNoElectronJMEPFBRECO ,
0180     pfNoElectronJMEClonesPFBRECO,
0181     pfJetPFBRECOTask ,
0182     pfNoJetPFBRECO ,
0183     pfTauTask ,
0184     pfNoTauPFBRECO ,
0185     pfMETPFBRECO
0186     )
0187 PFBRECO = cms.Sequence(PFBRECOTask)
0188