CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/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 = "hadronicOverEm<0.2 && (abs(superCluster.eta)<2.5)  && ((isEB && sigmaIetaIeta<0.015) || (isEE && sigmaIetaIeta<0.035)) && (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_TAGTRACK_CUT_MIN = 60.
00021 MASS_TAGTRACK_CUT_MAX = 120.
00022 
00023 ##   ____                         ____ _           _            
00024 ##  / ___| _   _ _ __   ___ _ __ / ___| |_   _ ___| |_ ___ _ __ 
00025 ##  \___ \| | | | '_ \ / _ \ '__| |   | | | | / __| __/ _ \ '__|
00026 ##   ___) | |_| | |_) |  __/ |  | |___| | |_| \__ \ ||  __/ |   
00027 ##  |____/ \__,_| .__/ \___|_|   \____|_|\__,_|___/\__\___|_|   
00028 ##  
00029 
00030 #  photons!!! ################ 
00031 goodPhotons = cms.EDFilter(
00032     "PhotonSelector",
00033     src = cms.InputTag( PHOTON_COLL ),
00034     cut = cms.string(PHOTON_CUTS)
00035     )
00036 
00037 photon_sequence = cms.Sequence(
00038     goodPhotons
00039     )
00040 
00041 
00042 # Tracks ###########
00043 from  PhysicsTools.RecoAlgos.allTrackCandidates_cfi import  allTrackCandidates
00044 
00045 goodTracks = cms.EDFilter("CandViewRefSelector",
00046     filter = cms.bool(True),
00047     src = cms.InputTag("allTrackCandidates"),
00048     cut = cms.string('pt > '+str(PHOTON_ET_CUT_MIN))
00049 )
00050 
00051 track_sequence = cms.Sequence(allTrackCandidates + goodTracks)
00052 
00053 ##    ____      __ _____ _           _                   
00054 ##   / ___|___ / _| ____| | ___  ___| |_ _ __ ___  _ __  
00055 ##  | |  _/ __| |_|  _| | |/ _ \/ __| __| '__/ _ \| '_ \ 
00056 ##  | |_| \__ \  _| |___| |  __/ (__| |_| | | (_) | | | |
00057 ##   \____|___/_| |_____|_|\___|\___|\__|_|  \___/|_| |_|
00058 ##  
00059 #  GsfElectron ################
00060 from DPGAnalysis.Skims.WElectronSkim_cff import goodElectrons
00061 
00062 
00063 GsfMatchedPhotonCands = cms.EDProducer("ElectronMatchedCandidateProducer",
00064    src     = cms.InputTag("goodPhotons"),
00065    ReferenceElectronCollection = cms.untracked.InputTag("goodElectrons"),
00066    deltaR =  cms.untracked.double(0.3)
00067 )
00068 
00069 ##    _____ _           _                     ___    _ 
00070 ##   | ____| | ___  ___| |_ _ __ ___  _ __   |_ _|__| |
00071 ##   |  _| | |/ _ \/ __| __| '__/ _ \| '_ \   | |/ _` |
00072 ##   | |___| |  __/ (__| |_| | | (_) | | | |  | | (_| |
00073 ##   |_____|_|\___|\___|\__|_|  \___/|_| |_| |___\__,_|
00074 ##   
00075 # Electron ID  ######
00076 from DPGAnalysis.Skims.WElectronSkim_cff import PassingWP90
00077                          
00078 ##    _____     _                         __  __       _       _     _             
00079 ##   |_   _| __(_) __ _  __ _  ___ _ __  |  \/  | __ _| |_ ___| |__ (_)_ __   __ _ 
00080 ##     | || '__| |/ _` |/ _` |/ _ \ '__| | |\/| |/ _` | __/ __| '_ \| | '_ \ / _` |
00081 ##     | || |  | | (_| | (_| |  __/ |    | |  | | (_| | || (__| | | | | | | | (_| |
00082 ##     |_||_|  |_|\__, |\__, |\___|_|    |_|  |_|\__,_|\__\___|_| |_|_|_| |_|\__, |
00083 ##                |___/ |___/                                                |___/ 
00084 ##   
00085 # Trigger  ##################
00086 PassingHLT = cms.EDProducer("trgMatchGsfElectronProducer",    
00087     InputProducer = cms.InputTag( 'gsfElectrons' ),
00088     hltTags = cms.untracked.string("HLT_Ele"),
00089     triggerEventTag = cms.untracked.InputTag("hltTriggerSummaryAOD","",HLTProcessName),
00090     triggerResultsTag = cms.untracked.InputTag("TriggerResults","",HLTProcessName)   
00091 )
00092 
00093 ##    _____             ____        __ _       _ _   _             
00094 ##   |_   _|_ _  __ _  |  _ \  ___ / _(_)_ __ (_) |_(_) ___  _ __  
00095 ##     | |/ _` |/ _` | | | | |/ _ \ |_| | '_ \| | __| |/ _ \| '_ \ 
00096 ##     | | (_| | (_| | | |_| |  __/  _| | | | | | |_| | (_) | | | |
00097 ##     |_|\__,_|\__, | |____/ \___|_| |_|_| |_|_|\__|_|\___/|_| |_|
00098 ##              |___/
00099 ## 
00100 ZElecTagHLT = PassingHLT.clone(
00101     InputProducer = cms.InputTag( "PassingWP90" )
00102     )
00103 
00104 ele_sequence = cms.Sequence(
00105     goodElectrons +
00106     PassingWP90 +
00107     ZElecTagHLT
00108     )
00109 
00110 
00111 ##    _____ ___   ____    ____       _          
00112 ##   |_   _( _ ) |  _ \  |  _ \ __ _(_)_ __ ___ 
00113 ##     | | / _ \/\ |_) | | |_) / _` | | '__/ __|
00114 ##     | || (_>  <  __/  |  __/ (_| | | |  \__ \
00115 ##     |_| \___/\/_|     |_|   \__,_|_|_|  |___/
00116 ##                                              
00117 ##   
00118 import copy
00119 from HLTrigger.HLTfilters.hltHighLevel_cfi import *
00120 ZEEHltFilter = copy.deepcopy(hltHighLevel)
00121 ZEEHltFilter.throw = cms.bool(False)
00122 ZEEHltFilter.HLTPaths = ["HLT_Ele*"]
00123 
00124 tagPhoton = cms.EDProducer("CandViewShallowCloneCombiner",
00125     decay = cms.string("ZElecTagHLT goodPhotons"), # charge coniugate states are implied
00126     checkCharge = cms.bool(False),                           
00127     cut   = cms.string("mass > " + str(MASS_CUT_MIN))
00128 )
00129 tagPhotonCounter = cms.EDFilter("CandViewCountFilter",
00130                                     src = cms.InputTag("tagPhoton"),
00131                                     minNumber = cms.uint32(1)
00132                                     )
00133 tagPhotonFilter = cms.Sequence(tagPhoton * tagPhotonCounter)
00134 tagPhotonSeq = cms.Sequence( ZEEHltFilter *(photon_sequence + ele_sequence) * tagPhotonFilter )
00135 
00136 tagTrack = tagPhoton.clone(
00137     decay = cms.string("ZElecTagHLT goodTracks"),
00138     cut   = cms.string("mass > " + str(MASS_TAGTRACK_CUT_MIN)+ ' && mass < ' + str(MASS_TAGTRACK_CUT_MAX)),
00139 )
00140 tagTrackCounter = tagPhotonCounter.clone(
00141     src = cms.InputTag("tagTrack")
00142     )
00143 tagTrackFilter = cms.Sequence(tagTrack * tagTrackCounter)
00144 tagTrackSeq = cms.Sequence( ZEEHltFilter * (track_sequence + ele_sequence) * tagTrackFilter )
00145 
00146 tagGsf = tagPhoton.clone(
00147     decay = cms.string("PassingWP90 goodElectrons")
00148     )
00149 tagGsfCounter = tagPhotonCounter.clone(
00150     src = cms.InputTag("tagGsf")
00151     )
00152 tagGsfFilter = cms.Sequence(tagGsf * tagGsfCounter)
00153 tagGsfSeq = cms.Sequence( ZEEHltFilter * (ele_sequence) * tagGsfFilter )