CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/DPGAnalysis/Skims/python/ZElectronSkim_cff.py

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 HLTPath = "HLT_Ele"
00004 HLTProcessName = "HLT"
00005 
00006 #electron cuts
00007 ELECTRON_ET_CUT_MIN = 10.0
00008 TAG_ELECTRON_ET_CUT_MIN = 20.0
00009 
00010 #photon cuts (for probe)
00011 PHOTON_ET_CUT_MIN = 10.0
00012 PHOTON_COLL = "photons"
00013 PHOTON_CUTS = "(abs(superCluster.eta)<2.5) && ( hadronicOverEm<0.5  ||  ((isEB && sigmaIetaIeta<0.02) || (isEE && sigmaIetaIeta<0.04)) ) && (superCluster.energy*sin(superCluster.position.theta)>" + str(PHOTON_ET_CUT_MIN) + ")"
00014 
00015 #track cuts (for probe)
00016 TRACK_ET_CUT_MIN = 25.0
00017 
00018 #mass cuts (for T&P)
00019 MASS_CUT_MIN = 30.
00020 MASS_PHOTONTAG_CUT_MIN = 50.
00021 MASS_TAGTRACK_CUT_MIN = 60.
00022 MASS_TAGTRACK_CUT_MAX = 120.
00023 
00024 ##   ____                         ____ _           _            
00025 ##  / ___| _   _ _ __   ___ _ __ / ___| |_   _ ___| |_ ___ _ __ 
00026 ##  \___ \| | | | '_ \ / _ \ '__| |   | | | | / __| __/ _ \ '__|
00027 ##   ___) | |_| | |_) |  __/ |  | |___| | |_| \__ \ ||  __/ |   
00028 ##  |____/ \__,_| .__/ \___|_|   \____|_|\__,_|___/\__\___|_|   
00029 ##  
00030 
00031 #  photons!!! ################ 
00032 goodPhotons = cms.EDFilter(
00033     "PhotonSelector",
00034     src = cms.InputTag( PHOTON_COLL ),
00035     cut = cms.string(PHOTON_CUTS)
00036     )
00037 
00038 photon_sequence = cms.Sequence(
00039     goodPhotons
00040     )
00041 
00042 
00043 # Tracks ###########
00044 from  PhysicsTools.RecoAlgos.allTrackCandidates_cfi import  allTrackCandidates
00045 
00046 goodTracks = cms.EDFilter("CandViewRefSelector",
00047     filter = cms.bool(True),
00048     src = cms.InputTag("allTrackCandidates"),
00049     cut = cms.string('pt > '+str(PHOTON_ET_CUT_MIN))
00050 )
00051 
00052 track_sequence = cms.Sequence(allTrackCandidates + goodTracks)
00053 
00054 ##    ____      __ _____ _           _                   
00055 ##   / ___|___ / _| ____| | ___  ___| |_ _ __ ___  _ __  
00056 ##  | |  _/ __| |_|  _| | |/ _ \/ __| __| '__/ _ \| '_ \ 
00057 ##  | |_| \__ \  _| |___| |  __/ (__| |_| | | (_) | | | |
00058 ##   \____|___/_| |_____|_|\___|\___|\__|_|  \___/|_| |_|
00059 ##  
00060 #  GsfElectron ################
00061 from DPGAnalysis.Skims.WElectronSkim_cff import goodElectrons
00062 
00063 
00064 GsfMatchedPhotonCands = cms.EDProducer("ElectronMatchedCandidateProducer",
00065    src     = cms.InputTag("goodPhotons"),
00066    ReferenceElectronCollection = cms.untracked.InputTag("goodElectrons"),
00067    deltaR =  cms.untracked.double(0.3)
00068 )
00069 
00070 ##    _____ _           _                     ___    _ 
00071 ##   | ____| | ___  ___| |_ _ __ ___  _ __   |_ _|__| |
00072 ##   |  _| | |/ _ \/ __| __| '__/ _ \| '_ \   | |/ _` |
00073 ##   | |___| |  __/ (__| |_| | | (_) | | | |  | | (_| |
00074 ##   |_____|_|\___|\___|\__|_|  \___/|_| |_| |___\__,_|
00075 ##   
00076 # Electron ID  ######
00077 from DPGAnalysis.Skims.WElectronSkim_cff import PassingWP90
00078                          
00079 ##    _____     _                         __  __       _       _     _             
00080 ##   |_   _| __(_) __ _  __ _  ___ _ __  |  \/  | __ _| |_ ___| |__ (_)_ __   __ _ 
00081 ##     | || '__| |/ _` |/ _` |/ _ \ '__| | |\/| |/ _` | __/ __| '_ \| | '_ \ / _` |
00082 ##     | || |  | | (_| | (_| |  __/ |    | |  | | (_| | || (__| | | | | | | | (_| |
00083 ##     |_||_|  |_|\__, |\__, |\___|_|    |_|  |_|\__,_|\__\___|_| |_|_|_| |_|\__, |
00084 ##                |___/ |___/                                                |___/ 
00085 ##   
00086 # Trigger  ##################
00087 PassingHLT = cms.EDProducer("trgMatchGsfElectronProducer",    
00088     InputProducer = cms.InputTag( 'gsfElectrons' ),
00089     hltTags = cms.untracked.string("HLT_Ele"),
00090     triggerEventTag = cms.untracked.InputTag("hltTriggerSummaryAOD","",HLTProcessName),
00091     triggerResultsTag = cms.untracked.InputTag("TriggerResults","",HLTProcessName)   
00092 )
00093 
00094 ##    _____             ____        __ _       _ _   _             
00095 ##   |_   _|_ _  __ _  |  _ \  ___ / _(_)_ __ (_) |_(_) ___  _ __  
00096 ##     | |/ _` |/ _` | | | | |/ _ \ |_| | '_ \| | __| |/ _ \| '_ \ 
00097 ##     | | (_| | (_| | | |_| |  __/  _| | | | | | |_| | (_) | | | |
00098 ##     |_|\__,_|\__, | |____/ \___|_| |_|_| |_|_|\__|_|\___/|_| |_|
00099 ##              |___/
00100 ## 
00101 ZElecTagHLT = PassingHLT.clone(
00102     InputProducer = cms.InputTag( "PassingWP90" )
00103     )
00104 
00105 Zele_sequence = cms.Sequence(
00106     goodElectrons +
00107     PassingWP90 +
00108     ZElecTagHLT
00109     )
00110 
00111 
00112 ##    _____ ___   ____    ____       _          
00113 ##   |_   _( _ ) |  _ \  |  _ \ __ _(_)_ __ ___ 
00114 ##     | | / _ \/\ |_) | | |_) / _` | | '__/ __|
00115 ##     | || (_>  <  __/  |  __/ (_| | | |  \__ \
00116 ##     |_| \___/\/_|     |_|   \__,_|_|_|  |___/
00117 ##                                              
00118 ##   
00119 import copy
00120 from HLTrigger.HLTfilters.hltHighLevel_cfi import *
00121 ZEEHltFilter = copy.deepcopy(hltHighLevel)
00122 ZEEHltFilter.throw = cms.bool(False)
00123 ZEEHltFilter.HLTPaths = ["HLT_Ele*"]
00124 
00125 tagPhoton = cms.EDProducer("CandViewShallowCloneCombiner",
00126     decay = cms.string("ZElecTagHLT goodPhotons"), # charge coniugate states are implied
00127     checkCharge = cms.bool(False),                           
00128     cut   = cms.string("mass > " + str(MASS_PHOTONTAG_CUT_MIN))
00129 )
00130 tagPhotonCounter = cms.EDFilter("CandViewCountFilter",
00131                                     src = cms.InputTag("tagPhoton"),
00132                                     minNumber = cms.uint32(1)
00133                                     )
00134 tagPhotonFilter = cms.Sequence(tagPhoton * tagPhotonCounter)
00135 tagPhotonSeq = cms.Sequence( ZEEHltFilter *(photon_sequence + Zele_sequence) * tagPhotonFilter )
00136 
00137 tagTrack = tagPhoton.clone(
00138     decay = cms.string("ZElecTagHLT goodTracks"),
00139     cut   = cms.string("mass > " + str(MASS_TAGTRACK_CUT_MIN)+ ' && mass < ' + str(MASS_TAGTRACK_CUT_MAX)),
00140 )
00141 tagTrackCounter = tagPhotonCounter.clone(
00142     src = cms.InputTag("tagTrack")
00143     )
00144 tagTrackFilter = cms.Sequence(tagTrack * tagTrackCounter)
00145 tagTrackSeq = cms.Sequence( ZEEHltFilter * (track_sequence + Zele_sequence) * tagTrackFilter )
00146 
00147 tagGsf = tagPhoton.clone(
00148     decay = cms.string("PassingWP90 goodElectrons")
00149     )
00150 tagGsfCounter = tagPhotonCounter.clone(
00151     src = cms.InputTag("tagGsf")
00152     )
00153 tagGsfFilter = cms.Sequence(tagGsf * tagGsfCounter)
00154 tagGsfSeq = cms.Sequence( ZEEHltFilter * (Zele_sequence) * tagGsfFilter )