Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-26 04:12:37

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # include  particle flow local reconstruction
0004 from RecoParticleFlow.PFClusterProducer.particleFlowCluster_cff import *
0005 
0006 # run a trimmed down PF sequence with heavy-ion vertex, no conversions, nucl int, etc.
0007 
0008 from RecoParticleFlow.PFProducer.particleFlowEGamma_cff import *
0009 particleFlowEGamma.vertexCollection = "hiSelectedVertex"
0010 gedGsfElectronCores.ctfTracks = "hiGeneralTracks"
0011 gedGsfElectronsTmp.ctfTracksTag = "hiGeneralTracks"
0012 gedGsfElectronsTmp.vtxTag = "hiSelectedVertex"
0013 gedGsfElectronsTmp.preselection.minSCEtBarrel = 15.0
0014 gedGsfElectronsTmp.preselection.minSCEtEndcaps = 15.0
0015 gedGsfElectronsTmp.fillConvVtxFitProb = False
0016 
0017 gedPhotonsTmp.primaryVertexProducer = "hiSelectedVertex"
0018 gedPhotonsTmp.isolationSumsCalculatorSet.trackProducer = "hiGeneralTracks"
0019 gedPhotons.primaryVertexProducer = "hiSelectedVertex"
0020 gedPhotons.isolationSumsCalculatorSet.trackProducer = "hiGeneralTracks"
0021 photonIDValueMaps.vertices = "hiSelectedVertex"
0022 from RecoHI.HiEgammaAlgos.photonIsolationHIProducer_cfi import photonIsolationHIProducer
0023 
0024 photonIsolationHIProducerGED = photonIsolationHIProducer.clone(photonProducer = "gedPhotonsTmp")
0025 
0026 #These are set for consistency w/ HiElectronSequence, but these cuts need to be studied
0027 gedGsfElectronsTmp.preselection.maxHOverEBarrelCone = 0.25
0028 gedGsfElectronsTmp.preselection.maxHOverEEndcapsCone = 0.25
0029 gedGsfElectronsTmp.preselection.maxHOverEBarrelBc = 0.0
0030 gedGsfElectronsTmp.preselection.maxHOverEEndcapsBc = 0.0
0031 gedGsfElectronsTmp.preselection.maxEOverPBarrel = 2.
0032 gedGsfElectronsTmp.preselection.maxEOverPEndcaps = 2.
0033 
0034 ootPhotonsTmp.primaryVertexProducer = "hiSelectedVertex"
0035 ootPhotonsTmp.isolationSumsCalculatorSet.trackProducer = "hiGeneralTracks"
0036 ootPhotons.primaryVertexProducer = "hiSelectedVertex"
0037 ootPhotons.isolationSumsCalculatorSet.trackProducer = "hiGeneralTracks"
0038 
0039 from RecoParticleFlow.Configuration.RecoParticleFlow_cff import *
0040 
0041 mvaElectrons.vertexTag = "hiSelectedVertex"
0042 
0043 particleFlowBlock.elementImporters = cms.VPSet(
0044     cms.PSet( importerName = cms.string("GSFTrackImporter"),
0045               source = cms.InputTag("pfTrackElec"),
0046               gsfsAreSecondary = cms.bool(False),
0047               superClustersArePF = cms.bool(True) ),
0048     cms.PSet( importerName = cms.string("SuperClusterImporter"),
0049                   source_eb = cms.InputTag("particleFlowSuperClusterECAL:particleFlowSuperClusterECALBarrel"),
0050                   source_ee = cms.InputTag("particleFlowSuperClusterECAL:particleFlowSuperClusterECALEndcapWithPreshower"),
0051                   source_towers = cms.InputTag("towerMaker"),
0052                   maximumHoverE = cms.double(0.5),
0053                   minSuperClusterPt = cms.double(10.0),
0054                   minPTforBypass = cms.double(100.0),
0055                   superClustersArePF = cms.bool(True) ),
0056     # all secondary track importers
0057     cms.PSet( importerName = cms.string("GeneralTracksImporter"),
0058               source = cms.InputTag("pfTrack"),
0059               muonSrc = cms.InputTag("hiMuons1stStep"),
0060               trackQuality = cms.string("highPurity"),
0061               cleanBadConvertedBrems = cms.bool(False),
0062               useIterativeTracking = cms.bool(False),
0063               DPtOverPtCuts_byTrackAlgo = cms.vdouble(-1.0,-1.0,-1.0,
0064                                                        1.0,1.0),
0065               NHitCuts_byTrackAlgo = cms.vuint32(3,3,3,3,3),
0066               muonMaxDPtOPt = cms.double(1),
0067               vetoEndcap = cms.bool(False)
0068               ),
0069     # to properly set SC based links you need to run ECAL importer
0070     # after you've imported all SCs to the block
0071     cms.PSet( importerName = cms.string("ECALClusterImporter"),
0072               source = cms.InputTag("particleFlowClusterECAL"),
0073               BCtoPFCMap = cms.InputTag('particleFlowSuperClusterECAL:PFClusterAssociationEBEE') ),
0074     cms.PSet( importerName = cms.string("GenericClusterImporter"),
0075               source = cms.InputTag("particleFlowClusterHCAL") ),
0076     cms.PSet( importerName = cms.string("GenericClusterImporter"),
0077               source = cms.InputTag("particleFlowClusterHO") ),
0078     cms.PSet( importerName = cms.string("GenericClusterImporter"),
0079               source = cms.InputTag("particleFlowClusterHF") ),
0080     cms.PSet( importerName = cms.string("GenericClusterImporter"),
0081               source = cms.InputTag("particleFlowClusterPS") )
0082     )
0083 
0084 particleFlowTmp.postMuonCleaning = False
0085 particleFlowTmp.vertexCollection = "hiSelectedVertex"
0086 particleFlowTmp.muons = "hiMuons1stStep"
0087 particleFlowTmp.usePFConversions = False
0088 
0089 pfNoPileUpIso.enable = False
0090 pfPileUpIso.enable = False
0091 pfNoPileUp.enable = False
0092 pfPileUp.enable = False
0093 particleFlow.Muons = "muons:hiMuons1stStep2muonsMap"
0094 
0095 
0096 # local reco must run before electrons (RecoHI/HiEgammaAlgos), due to PF integration
0097 hiParticleFlowLocalRecoTask = cms.Task(particleFlowClusterTask)
0098 hiParticleFlowLocalReco = cms.Sequence(hiParticleFlowLocalRecoTask)
0099 
0100 particleFlowTmpTask = cms.Task(particleFlowTmp)
0101 particleFlowTmpSeq = cms.Sequence(particleFlowTmpTask)
0102 
0103 #PF Reco runs after electrons
0104 hiParticleFlowRecoTask = cms.Task( pfGsfElectronMVASelectionTask
0105                                    , particleFlowBlock
0106                                    , particleFlowEGammaFullTask
0107                                    , photonIsolationHIProducerGED
0108                                    , particleFlowTmpTask
0109                                    , fixedGridRhoFastjetAllTmp
0110                                    , particleFlowTmpPtrs
0111                                    , particleFlowEGammaFinalTask
0112                                    , pfParticleSelectionTask
0113                                    )
0114 hiParticleFlowReco = cms.Sequence(hiParticleFlowRecoTask)
0115 
0116 particleFlowLinksTask = cms.Task( particleFlow,particleFlowPtrs,chargedHadronPFTrackIsolation,particleBasedIsolationTask)
0117 particleFlowLinks = cms.Sequence(particleFlowLinksTask)