Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:53:44

0001 '''
0002 Defines the selection sequence ZmmgSkimSeq for the Zmmg skim for the 
0003 RAW-RECO event content. It also defines several other modules and sequences
0004 used: 
0005     ZmmgHLTFilter
0006     ZmmgTrailingMuons
0007     ZmmgLeadingMuons
0008     ZmmgDimuons
0009     ZmmgDimuonFilter
0010     ZmmgDimuonSequence
0011     ZmmgMergedSuperClusters
0012     ZmmgPhotonCandidates
0013     ZmmgPhotons
0014     ZmmgPhotonSequence
0015     ZmmgCandidates
0016     ZmmgFilter
0017     ZmmgSequence
0018 
0019 Jan Veverka, Caltech, 5 May 2012
0020 '''
0021 
0022 import copy
0023 import FWCore.ParameterSet.Config as cms
0024 
0025 
0026 ###____________________________________________________________________________
0027 ###
0028 ###  HLT Filter
0029 ###____________________________________________________________________________
0030 
0031 import copy
0032 from HLTrigger.HLTfilters.hltHighLevel_cfi import *
0033 ZmmgHLTFilter = copy.deepcopy(hltHighLevel)
0034 ZmmgHLTFilter.throw = cms.bool(False)
0035 ZmmgHLTFilter.HLTPaths = ['HLT_Mu*','HLT_IsoMu*','HLT_DoubleMu*']
0036 
0037 
0038 ###____________________________________________________________________________
0039 ###
0040 ###  Build the Dimuon Sequence
0041 ###____________________________________________________________________________
0042 
0043 ### Get muons of needed quality for Z -> mumugamma 
0044 ZmmgTrailingMuons = cms.EDFilter('MuonSelector',
0045     src = cms.InputTag('muons'),
0046     cut = cms.string('''pt > 10 && 
0047                         abs(eta) < 2.4 && 
0048                         isGlobalMuon = 1 && 
0049                         isTrackerMuon = 1 && 
0050                         abs(innerTrack().dxy)<2.0'''),
0051     filter = cms.bool(True)                                
0052     )
0053 
0054 ### Require a harder pt cut on the leading leg
0055 ZmmgLeadingMuons = cms.EDFilter('MuonSelector',
0056     src = cms.InputTag('ZmmgTrailingMuons'),
0057     cut = cms.string('pt > 20'),
0058     filter = cms.bool(True)                                
0059     )
0060 
0061 ### Build dimuon candidates
0062 ZmmgDimuons = cms.EDProducer('CandViewShallowCloneCombiner',
0063     decay = cms.string('ZmmgLeadingMuons@+ ZmmgTrailingMuons@-'),
0064     checkCharge = cms.bool(True),
0065     cut = cms.string('mass > 30'),
0066     )
0067 
0068 ### Require at least one dimuon candidate
0069 ZmmgDimuonFilter = cms.EDFilter('CandViewCountFilter',
0070     src = cms.InputTag('ZmmgDimuons'),
0071     minNumber = cms.uint32(1)
0072     )
0073 
0074 ### Put together the dimuon sequence
0075 ZmmgDimuonSequence = cms.Sequence(
0076     ZmmgTrailingMuons *
0077     ZmmgLeadingMuons *
0078     ZmmgDimuons *
0079     ZmmgDimuonFilter
0080     )
0081     
0082     
0083 ###____________________________________________________________________________
0084 ###
0085 ###  Build the Supercluster/Photon Sequence
0086 ###____________________________________________________________________________
0087 
0088 ### Merge the barrel and endcap superclusters
0089 ZmmgMergedSuperClusters =  cms.EDProducer('EgammaSuperClusterMerger',
0090     src = cms.VInputTag(
0091         cms.InputTag('correctedHybridSuperClusters'),
0092         cms.InputTag('correctedMulti5x5SuperClustersWithPreshower')
0093         )
0094     )
0095 
0096 ### Build candidates from all the merged superclusters
0097 ZmmgPhotonCandidates = cms.EDProducer('ConcreteEcalCandidateProducer',
0098     src = cms.InputTag('ZmmgMergedSuperClusters'),
0099     particleType = cms.string('gamma')
0100     )
0101 
0102 ### Select photon candidates with Et > 5 GeV
0103 ZmmgPhotons = cms.EDFilter('CandViewSelector',
0104     src = cms.InputTag('ZmmgPhotonCandidates'),
0105     cut = cms.string('et > 5'),
0106     filter = cms.bool(True)
0107     )
0108 
0109 ### Put together the photon sequence
0110 ZmmgPhotonSequence = cms.Sequence(
0111     ZmmgMergedSuperClusters *
0112     ZmmgPhotonCandidates *
0113     ZmmgPhotons
0114     )
0115     
0116     
0117 ###____________________________________________________________________________
0118 ###
0119 ###  Build the mu-mu-gamma filter sequence
0120 ###____________________________________________________________________________
0121 
0122 ### Combine dimuons and photons to mumugamma candidates requiring
0123 ###     1. trailing muon pt + photon et > 20 GeV
0124 ###     2. distance between photon and near muon deltaR < 1.5
0125 ###     3. sum of invariant masses of the mmg and mm systems < 200 GeV 
0126 ###     4. invariant mass of the mmg system > 40 GeV
0127 ### dimuon        = daughter(0)
0128 ### leading muon  = daughter(0).daughter(0)
0129 ### trailing muon = daughter(0).daughter(1)
0130 ### photon        = daughter(1)
0131 ZmmgCandidates = cms.EDProducer('CandViewShallowCloneCombiner',
0132     decay = cms.string('ZmmgDimuons ZmmgPhotons'),
0133     checkCharge = cms.bool(False),
0134     cut = cms.string('''
0135         daughter(0).daughter(1).pt + daughter(1).pt > 20 &
0136         min(deltaR(daughter(0).daughter(0).eta,
0137                    daughter(0).daughter(0).phi,
0138                    daughter(1).eta,
0139                    daughter(1).phi),
0140             deltaR(daughter(0).daughter(1).eta,
0141                    daughter(0).daughter(1).phi,
0142                    daughter(1).eta,
0143                    daughter(1).phi)) < 1.5 &
0144         mass + daughter(0).mass < 200 &
0145         mass > 40
0146         '''),
0147     )
0148     
0149 ### Require at least one mu-mu-gamma candidate passing the cuts
0150 ZmmgFilter = cms.EDFilter('CandViewCountFilter',
0151     src = cms.InputTag('ZmmgCandidates'),
0152     minNumber = cms.uint32(1)
0153     )
0154     
0155 ZmmgSequence = cms.Sequence(
0156     ZmmgCandidates *
0157     ZmmgFilter
0158     )
0159 
0160 
0161 ###____________________________________________________________________________
0162 ###
0163 ###  Build the full selection sequence for the ZMuMuGammaSkim
0164 ###____________________________________________________________________________
0165 
0166 ZmmgSkimSeq = cms.Sequence(
0167     ZmmgHLTFilter *
0168     ZmmgDimuonSequence *
0169     ZmmgPhotonSequence *
0170     ZmmgSequence
0171     )
0172