Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:26:48

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 ##======================================
0004 ## Muons
0005 ##======================================
0006 
0007 selectedMuons = cms.EDFilter(
0008     "MuonSelector",
0009     src = cms.InputTag('muons'),
0010     cut = cms.string(    "(isTrackerMuon) && std::abs(eta) < 2.5 && pt > 19.5"+#17. "+
0011                          "&& isPFMuon"+
0012                          "&& globalTrack.isNonnull"+
0013                          "&& innerTrack.hitPattern.numberOfValidPixelHits > 0"+
0014                          "&& innerTrack.normalizedChi2 < 10"+
0015                          "&& numberOfMatches > 0"+
0016                          "&& innerTrack.hitPattern.numberOfValidTrackerHits>5"+
0017                          "&& globalTrack.hitPattern.numberOfValidHits>0"+
0018                          "&& (pfIsolationR03.sumChargedHadronPt+std::max(0.,pfIsolationR03.sumNeutralHadronEt+pfIsolationR03.sumPhotonEt - 0.5*pfIsolationR03.sumPUPt))/pt < 0.3"+
0019                          "&& std::abs(innerTrack().dxy)<2.0"
0020                          ),
0021     filter = cms.bool(False)
0022     )
0023 
0024 
0025 ##======================================
0026 ## Electrons
0027 ##======================================
0028 
0029 
0030 selectedElectrons = cms.EDFilter(
0031     "GsfElectronSelector",
0032             src = cms.InputTag('gedGsfElectrons'),
0033             cut = cms.string(
0034             "std::abs(eta) < 2.5 && pt > 19.5"                              +
0035             "&& (gsfTrack.hitPattern().numberOfLostHits(\'MISSING_INNER_HITS\')<=1 )" +
0036             "&& (pfIsolationVariables.sumChargedHadronPt+std::max(0.,pfIsolationVariables.sumNeutralHadronEt+pfIsolationVariables.sumPhotonEt - 0.5*pfIsolationVariables.sumPUPt))/et     < 0.3"  +
0037             "&& ((std::abs(eta) < 1.4442  "                                 +
0038             "&& std::abs(deltaEtaSuperClusterTrackAtVtx)            < 0.007"+
0039             "&& std::abs(deltaPhiSuperClusterTrackAtVtx)            < 0.8"  +
0040             "&& sigmaIetaIeta                                  < 0.01" +
0041             "&& hcalOverEcal                                   < 0.15" +
0042             "&& std::abs(1./superCluster.energy - 1./p)             < 0.05)"+
0043             "|| (std::abs(eta)  > 1.566 "+
0044             "&& std::abs(deltaEtaSuperClusterTrackAtVtx)            < 0.009"+
0045             "&& std::abs(deltaPhiSuperClusterTrackAtVtx)            < 0.10" +
0046             "&& sigmaIetaIeta                                  < 0.03" +
0047             "&& hcalOverEcal                                   < 0.10" +
0048             "&& std::abs(1./superCluster.energy - 1./p)             < 0.05))" 
0049             ),
0050         filter = cms.bool(False)
0051         )
0052 
0053 
0054 ##======================================
0055 ## Taus
0056 ##======================================
0057 
0058 selectedTaus = cms.EDFilter("PFTauSelector",
0059     src = cms.InputTag('hpsPFTauProducer'),
0060     discriminators = cms.VPSet(
0061         cms.PSet(
0062             discriminator = cms.InputTag('hpsPFTauDiscriminationByDecayModeFinding'),
0063             selectionCut = cms.double(0.5)
0064         ),
0065         cms.PSet(
0066             discriminator = cms.InputTag('hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits'),
0067             selectionCut = cms.double(0.5)
0068         )                        
0069     ),
0070     cut = cms.string("pt > 20. & std::abs(eta) < 2.3")                        
0071 )
0072 
0073 
0074 
0075 ##======================================
0076 ## Photons
0077 ##======================================
0078 
0079 selectedPhotons = cms.EDFilter("PhotonSelector",
0080     src = cms.InputTag("photons"),
0081     cut = cms.string(
0082         "std::abs(eta) < 2.5 && pt > 19.5" +
0083         "&& sigmaIetaIeta < 0.03" +
0084         "&& hadronicOverEm < 0.05" +
0085         "&& hasPixelSeed == 0" +
0086         "&& (chargedHadronIso + neutralHadronIso + photonIso)/pt < 0.2"
0087         )
0088 )
0089 
0090 ##======================================
0091 ## Jets
0092 ##======================================
0093 
0094 #pileup jetId applied per default in the process
0095 
0096 jet_acc = '(pt >= 30 && std::abs(eta)<2.5)'
0097 #jet_id = ''
0098 
0099 selectedJets = cms.EDFilter("PFJetSelector",
0100     src = cms.InputTag("ak4PFJets"),
0101     cut = cms.string(
0102         "(pt >= 30 && std::abs(eta)<2.5)" +
0103         "&& neutralHadronEnergyFraction < 0.99" +
0104         "&& neutralEmEnergyFraction < 0.99" +
0105         "&& getPFConstituents.size > 1"
0106         )
0107 )
0108 
0109 
0110 selectionSequenceForMVANoPUMETTask = cms.Task(
0111 selectedMuons,
0112 selectedElectrons,
0113 selectedTaus,
0114 selectedPhotons,
0115 selectedJets
0116 )
0117 selectionSequenceForMVANoPUMET = cms.Sequence(selectionSequenceForMVANoPUMETTask)