Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:06:46

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 
0004 '''
0005 ## 2012 HLT COND.S AS GIVEN BY ARUN IN 53X
0006 from HLTrigger.HLTfilters.hltHighLevel_cfi import hltHighLevel as hlt_selector
0007 hlt_selector.throw = cms.bool(False)
0008 TauSkimMuTauMETHLT = hlt_selector.clone()
0009 TauSkimMuTauMETHLT.TriggerResultsTag = cms.InputTag('TriggerResults', '', 'HLT')
0010 TauSkimMuTauMETHLT.andOr=cms.bool(True)
0011 TauSkimMuTauMETHLT.HLTPaths = cms.vstring("HLT_IsoMu15_eta2p1_L1ETM20_v*", "HLT_IsoMu15Rho_eta2p1_L1ETM20_v*")
0012 '''
0013 
0014 TauSkimPFTausSelected = cms.EDFilter("PFTauSelector",
0015   src = cms.InputTag("hpsPFTauProducer"),
0016   discriminators = cms.VPSet(
0017   cms.PSet(  #discriminator=cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding"),      #53X AND 75X
0018              discriminator=cms.InputTag("hpsPFTauDiscriminationByDecayModeFindingNewDMs"), #HTT 2015 TWIKI  
0019              selectionCut=cms.double(0.5)
0020 
0021            ) ## COMMENT OUT IF USING THE PSET BELOW 
0022 #           ),
0023 
0024   #cms.PSet(#discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr"), ## 53X
0025   #          #discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseIsolation"),   #75X
0026   #          discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"), #HTT 2015 TWIKI   
0027   #          selectionCut=cms.double(0.5)
0028   #    ),
0029 
0030 
0031   ),
0032   discriminatorContainers = cms.VPSet(),
0033   #cut = cms.string('pt > 22. && abs(eta) < 2.3') #53X
0034   #cut = cms.string('et > 15. && abs(eta) < 2.5')  #75X
0035   #cut = cms.string('pt > 18. && abs(eta) < 2.3') #HTT 2015 TWIKI
0036   cut = cms.string('pt > 18. && abs(eta) < 2.3 && hpsPFTauMVA3IsolationChargedIsoPtSum < 2') #MICHAL'S SUGGESTION
0037 )
0038 
0039 TauSkimPFTauSkimmedBy1 = cms.EDFilter("CandViewCountFilter",
0040  src = cms.InputTag('TauSkimPFTausSelected'),
0041  minNumber = cms.uint32(1)
0042 )
0043 
0044 TauSkimPFTauSkimmedBy2 = cms.EDFilter("CandViewCountFilter",
0045  src = cms.InputTag('TauSkimPFTausSelected'),
0046  minNumber = cms.uint32(2)
0047 )
0048 
0049 ## MODULE IN 53X ONLY
0050 TauSkimDiTauPairs = cms.EDProducer("CandViewShallowCloneCombiner",
0051                                    decay = cms.string("TauSkimPFTausSelected TauSkimPFTausSelected"),
0052                                    checkCharge = cms.bool(False),
0053                                    cut = cms.string("sqrt((daughter(0).eta-daughter(1).eta)*(daughter(0).eta-daughter(1).eta)+ min( abs(daughter(0).phi-daughter(1).phi), 2*3.1415926 - abs(daughter(0).phi-daughter(1).phi) ) * min( abs(daughter(0).phi-daughter(1).phi), 2*3.1415926 - abs(daughter(0).phi-daughter(1).phi) ) )>0.5"),
0054                                    )
0055 
0056 ## MODULE IN 53X ONLY  
0057 TauSkimDiTauPairFilter = cms.EDFilter("CandViewCountFilter",
0058                                       src = cms.InputTag("TauSkimDiTauPairs"),
0059                                       minNumber = cms.uint32(1)
0060                                       )
0061 
0062 
0063 ## MODULE IN 53X ONLY  
0064 TauSkimPFTausSelectedForMuTau = TauSkimPFTausSelected.clone()
0065 TauSkimPFTausSelectedForMuTau.discriminators = cms.VPSet(
0066     cms.PSet( #discriminator=cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding"), # 53X AND 75X
0067               discriminator=cms.InputTag("hpsPFTauDiscriminationByDecayModeFindingNewDMs"), #HTT 2015 TWIKI   
0068               selectionCut=cms.double(0.5)
0069               ),
0070 
0071 #    cms.PSet( #discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr"), #53X
0072 #              #discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseIsolation"),   #75X
0073 #              discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"), #HTT 2015 TWIKI 
0074 #              selectionCut=cms.double(0.5)
0075 #              ),
0076 
0077     #cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByElectronVLooseMVA5"), #HTT 2015 TWIKI (not working!)
0078     #          selectionCut=cms.double(0.5)
0079     #          ),
0080 
0081 
0082     )
0083 
0084 TauSkimPFTausSelectedForMuTau.discriminatorContainers = cms.VPSet(
0085     cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByMuonRejection3"),
0086               workingPoints=cms.vstring("ByLooseMuonRejection3"),
0087               rawValues=cms.vstring(),
0088               selectionCuts=cms.vdouble()
0089     )
0090 )
0091 
0092 ## MODULE IN 53X ONLY  
0093 #TauSkimPFTausSelectedForMuTau.cut = cms.string('pt > 18. && abs(eta) < 2.3') #75X
0094 TauSkimPFTausSelectedForMuTau.cut = cms.string('pt > 18. && abs(eta) < 2.3') #HTT 2015 TWIKI   
0095 TauSkimPFTauSkimmedForMuTau = cms.EDFilter("CandViewCountFilter",
0096                                             src = cms.InputTag('TauSkimPFTausSelectedForMuTau'),
0097                                             minNumber = cms.uint32(1)
0098                                            )
0099 ## NO MuTauMET MODULES IMPLEMETED HERE FROM 53X
0100 
0101 
0102 ## MODULE IN 53X ONLY 
0103 TauSkimMuonSelected = cms.EDFilter("MuonRefSelector",
0104                                    src = cms.InputTag("muons"),
0105                                    cut = cms.string("pt > 20 && " + "abs(eta) < 2.1 && " +
0106                                                     "isGlobalMuon && isTrackerMuon" +
0107                                                     #" && globalTrack.isNonnull "+
0108                                                     #" && globalTrack.hitPattern.numberOfValidTrackerHits>=5"+
0109                                                     #" && globalTrack.normalizedChi2<20"+
0110                                                     " && (pfIsolationR03.sumChargedHadronPt/pt) < 0.3"
0111                                                     ),
0112                                      )
0113 
0114 ## MODULE IN 53X ONLY   
0115 TauSkimMuonSkimmedBy1 = cms.EDFilter("CandViewCountFilter",
0116                                      src = cms.InputTag('TauSkimMuonSelected'),
0117                                      minNumber = cms.uint32(1)
0118                                      )
0119 
0120 ## MODULE IN 53X ONLY   
0121 TauSkimMuTauPairs = cms.EDProducer("CandViewShallowCloneCombiner",
0122                                     decay = cms.string("TauSkimMuonSelected TauSkimPFTausSelectedForMuTau"),
0123                                     checkCharge = cms.bool(False),
0124                                     cut         = cms.string("sqrt((daughter(0).eta-daughter(1).eta)*(daughter(0).eta-daughter(1).eta)+ min( abs(daughter(0).phi-daughter(1).phi), 2*3.1415926 - abs(daughter(0).phi-daughter(1).phi) ) * min( abs(daughter(0).phi-daughter(1).phi), 2*3.1415926 - abs(daughter(0).phi-daughter(1).phi) ) )>0.3"), ## DR CUT LOOSENED FOLLOWING MICHAL'S SUGGESTIONS FROM 0.5 TO 0.3
0125                                     )
0126 
0127 
0128 ## NO MuTauMET MODULES IMPLEMETED HERE FROM 53X
0129 
0130 ## MODULE IN 53X ONLY   
0131 TauSkimMuTauPairFilter = cms.EDFilter("CandViewCountFilter",
0132                                       src = cms.InputTag("TauSkimMuTauPairs"),
0133                                       minNumber = cms.uint32(1)
0134                                       )
0135 
0136 ## NO MuTauMET AND DITAU SEQUENCES IMPLEMETED HERE FROM 53X
0137 
0138 ## MUTAU SEQUENCE IN 53X ONLY   
0139 mutauSkimSequence = cms.Sequence(
0140      TauSkimMuonSelected *
0141      TauSkimMuonSkimmedBy1 *
0142      TauSkimPFTausSelectedForMuTau *
0143      TauSkimPFTauSkimmedForMuTau *
0144      TauSkimMuTauPairs *
0145      TauSkimMuTauPairFilter
0146      )
0147 
0148 
0149 
0150 
0151