Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:45

0001 import FWCore.ParameterSet.Config as cms
0002 ### HLT filter
0003 import copy
0004 from HLTrigger.HLTfilters.hltHighLevel_cfi import *
0005 from PhysicsTools.PatAlgos.producersLayer1.genericParticleProducer_cfi import patGenericParticles
0006 
0007 
0008 PbPbZMuHLTFilter = copy.deepcopy(hltHighLevel)
0009 PbPbZMuHLTFilter.throw = cms.bool(False)
0010 PbPbZMuHLTFilter.HLTPaths = ["HLT_HIL3Mu*"]
0011 
0012 ### Z -> MuMu candidates
0013 # Get muons of needed quality for Zs
0014 
0015 ###create a track collection with generic kinematic cuts
0016 looseMuonsForPbPbZMuSkim = cms.EDFilter("TrackSelector",
0017                              src = cms.InputTag("generalTracks"),
0018                              cut = cms.string('pt > 10 &&  abs(eta)<2.4 &&  (charge!=0)'),
0019                              filter = cms.bool(True)                                
0020                              )
0021 
0022 
0023 
0024 ###cloning the previous collection into a collection of candidates
0025 ConcretelooseMuonsForPbPbZMuSkim = cms.EDProducer("ConcreteChargedCandidateProducer",
0026                                               src = cms.InputTag("looseMuonsForPbPbZMuSkim"),
0027                                               particleType = cms.string("mu+")
0028                                               )
0029 
0030 
0031 
0032 ###create iso deposits
0033 tkIsoDepositTkForPbPbZMuSkim = cms.EDProducer("CandIsoDepositProducer",
0034                                 src = cms.InputTag("ConcretelooseMuonsForPbPbZMuSkim"),
0035                                 MultipleDepositsFlag = cms.bool(False),
0036                                 trackType = cms.string('track'),
0037                                 ExtractorPSet = cms.PSet(
0038         #MIsoTrackExtractorBlock
0039         Diff_z = cms.double(0.2),
0040         inputTrackCollection = cms.InputTag("generalTracks"),
0041         BeamSpotLabel = cms.InputTag("offlineBeamSpot"),
0042         ComponentName = cms.string('TrackExtractor'),
0043         DR_Max = cms.double(0.5),
0044         Diff_r = cms.double(0.1),
0045         Chi2Prob_Min = cms.double(-1.0),
0046         DR_Veto = cms.double(0.01),
0047         NHits_Min = cms.uint32(0),
0048         Chi2Ndof_Max = cms.double(1e+64),
0049         Pt_Min = cms.double(-1.0),
0050         DepositLabel = cms.untracked.string('tracker'),
0051         BeamlineOption = cms.string('BeamSpotFromEvent')
0052         )
0053                                 )
0054 
0055 ###adding isodeposits to candidate collection
0056 allPatTracksForPbPbZMuSkim = patGenericParticles.clone(
0057     src = cms.InputTag("ConcretelooseMuonsForPbPbZMuSkim"),
0058     # isolation configurables
0059     userIsolation = cms.PSet(
0060       tracker = cms.PSet(
0061         veto = cms.double(0.015),
0062         src = cms.InputTag("tkIsoDepositTkForPbPbZMuSkim"),
0063         deltaR = cms.double(0.3),
0064         #threshold = cms.double(1.5)
0065       ),
0066       ),
0067     isoDeposits = cms.PSet(
0068         tracker = cms.InputTag("tkIsoDepositTkForPbPbZMuSkim"),
0069         ),
0070     )
0071 
0072 
0073 
0074 
0075 ###create the "probe collection" of isolated tracks 
0076 looseIsoMuonsForPbPbZMuSkim = cms.EDFilter("PATGenericParticleSelector",  
0077                              src = cms.InputTag("allPatTracksForPbPbZMuSkim"), 
0078                              cut = cms.string("(userIsolation('pat::TrackIso')/pt)<0.4"),
0079                              filter = cms.bool(True)
0080                              )
0081 
0082 
0083 
0084 ###create the "tag collection" of muon candidate, no dB cut applied 
0085 
0086 
0087 tightMuonsForPbPbZMuSkim = cms.EDFilter("MuonSelector",
0088     src = cms.InputTag("muons"),
0089     cut = cms.string("(isGlobalMuon) && pt > 25. &&  (abs(eta)<2.4) &&  (isPFMuon>0) && (globalTrack().normalizedChi2() < 10) && (globalTrack().hitPattern().numberOfValidMuonHits()>0)&& (numberOfMatchedStations() > 1)&& (innerTrack().hitPattern().numberOfValidPixelHits() > 0)&& (innerTrack().hitPattern().trackerLayersWithMeasurement() > 5) && ((isolationR03().sumPt/pt)<0.1)"),
0090     filter = cms.bool(True)
0091     )
0092 
0093 
0094 
0095 
0096 # build Z-> MuMu candidates
0097 dimuonsForPbPbZMuSkim = cms.EDProducer("CandViewShallowCloneCombiner",
0098                          checkCharge = cms.bool(False),
0099                          cut = cms.string('(mass > 60) &&  (charge=0)'),       
0100                          decay = cms.string("tightMuonsForPbPbZMuSkim looseIsoMuonsForPbPbZMuSkim")
0101                          )                                    
0102 
0103 
0104 # Z filter
0105 dimuonsFilterForPbPbZMuSkim = cms.EDFilter("CandViewCountFilter",
0106                              src = cms.InputTag("dimuonsForPbPbZMuSkim"),
0107                              minNumber = cms.uint32(1)
0108                              )
0109 
0110 
0111 
0112 diMuonSelSeqForPbPbZMuSkim = cms.Sequence(
0113                             PbPbZMuHLTFilter *
0114                             looseMuonsForPbPbZMuSkim *
0115                             ConcretelooseMuonsForPbPbZMuSkim *
0116                             tkIsoDepositTkForPbPbZMuSkim *
0117                             allPatTracksForPbPbZMuSkim *
0118                             looseIsoMuonsForPbPbZMuSkim * 
0119                             tightMuonsForPbPbZMuSkim *
0120                             dimuonsForPbPbZMuSkim *
0121                             dimuonsFilterForPbPbZMuSkim 
0122 )
0123 
0124 
0125 
0126 
0127 
0128