CMS 3D CMS Logo

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

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 ##                      _              _       
00004 ##   ___ ___  _ __  ___| |_ __ _ _ __ | |_ ___ 
00005 ##  / __/ _ \| '_ \/ __| __/ _` | '_ \| __/ __|
00006 ## | (_| (_) | | | \__ \ || (_| | | | | |_\__ \
00007 ##  \___\___/|_| |_|___/\__\__,_|_| |_|\__|___/
00008 ##                                              
00009 
00010 HLTPath = "HLT_Ele"
00011 HLTProcessName = "HLT"
00012 
00013 #electron cuts
00014 ELECTRON_ET_CUT_MIN = 10.0
00015 TAG_ELECTRON_ET_CUT_MIN = 20.0
00016 W_ELECTRON_ET_CUT_MIN = 30.0
00017 ELECTRON_CUTS = "(abs(superCluster.eta)<2.5) && (ecalEnergy*sin(superClusterPosition.theta)>" + str(ELECTRON_ET_CUT_MIN) + ")"
00018 
00019 #met, mt cuts for W selection
00020 MET_CUT_MIN = 20.
00021 MT_CUT_MIN = 50.
00022 
00023 ##    ____      __ _____ _           _                   
00024 ##   / ___|___ / _| ____| | ___  ___| |_ _ __ ___  _ __  
00025 ##  | |  _/ __| |_|  _| | |/ _ \/ __| __| '__/ _ \| '_ \ 
00026 ##  | |_| \__ \  _| |___| |  __/ (__| |_| | | (_) | | | |
00027 ##   \____|___/_| |_____|_|\___|\___|\__|_|  \___/|_| |_|
00028 ##  
00029 #  GsfElectron ################ 
00030 goodElectrons = cms.EDFilter("GsfElectronRefSelector",
00031     src = cms.InputTag( 'gsfElectrons' ),
00032     cut = cms.string( ELECTRON_CUTS )    
00033 )
00034 
00035 GsfMatchedPhotonCands = cms.EDProducer("ElectronMatchedCandidateProducer",
00036    src     = cms.InputTag("goodPhotons"),
00037    ReferenceElectronCollection = cms.untracked.InputTag("goodElectrons"),
00038    deltaR =  cms.untracked.double(0.3)
00039 )
00040 
00041 ##    _____ _           _                     ___    _ 
00042 ##   | ____| | ___  ___| |_ _ __ ___  _ __   |_ _|__| |
00043 ##   |  _| | |/ _ \/ __| __| '__/ _ \| '_ \   | |/ _` |
00044 ##   | |___| |  __/ (__| |_| | | (_) | | | |  | | (_| |
00045 ##   |_____|_|\___|\___|\__|_|  \___/|_| |_| |___\__,_|
00046 ##   
00047 # Electron ID  ######
00048 PassingWP90 = goodElectrons.clone(
00049 cut = cms.string(
00050     goodElectrons.cut.value() +
00051     " && (gsfTrack.trackerExpectedHitsInner.numberOfHits<=1 && !(-0.02<convDist<0.02 && -0.02<convDcot<0.02))" #wrt std WP90 allowing 1 numberOfMissingExpectedHits 
00052     " && (ecalEnergy*sin(superClusterPosition.theta)>" + str(ELECTRON_ET_CUT_MIN) + ")"
00053     " && ((isEB"
00054     " && ( dr03TkSumPt/p4.Pt <0.12 && dr03EcalRecHitSumEt/p4.Pt < 0.09 && dr03HcalTowerSumEt/p4.Pt  < 0.1 )"
00055     " && (sigmaIetaIeta<0.01)"
00056     " && ( -0.8<deltaPhiSuperClusterTrackAtVtx<0.8 )"
00057     " && ( -0.007<deltaEtaSuperClusterTrackAtVtx<0.007 )"
00058     " && (hadronicOverEm<0.12)"
00059     ")"
00060     " || (isEE"
00061     " && ( dr03TkSumPt/p4.Pt <0.07 && dr03EcalRecHitSumEt/p4.Pt < 0.07 && dr03HcalTowerSumEt/p4.Pt  < 0.07 )"
00062     " && (sigmaIetaIeta<0.03)"
00063     " && ( -0.7<deltaPhiSuperClusterTrackAtVtx<0.7 )" 
00064     " && ( -0.009<deltaEtaSuperClusterTrackAtVtx<0.009 )"
00065     " && (hadronicOverEm<0.1) "
00066     "))"
00067     )
00068 )
00069 
00070                          
00071 ##    _____     _                         __  __       _       _     _             
00072 ##   |_   _| __(_) __ _  __ _  ___ _ __  |  \/  | __ _| |_ ___| |__ (_)_ __   __ _ 
00073 ##     | || '__| |/ _` |/ _` |/ _ \ '__| | |\/| |/ _` | __/ __| '_ \| | '_ \ / _` |
00074 ##     | || |  | | (_| | (_| |  __/ |    | |  | | (_| | || (__| | | | | | | | (_| |
00075 ##     |_||_|  |_|\__, |\__, |\___|_|    |_|  |_|\__,_|\__\___|_| |_|_|_| |_|\__, |
00076 ##                |___/ |___/                                                |___/ 
00077 ##   
00078 # Trigger  ##################
00079 PassingHLT = cms.EDProducer("trgMatchGsfElectronProducer",    
00080     InputProducer = cms.InputTag( 'gsfElectrons' ),                          
00081     hltTags = cms.untracked.string("HLT_Ele"),
00082     triggerEventTag = cms.untracked.InputTag("hltTriggerSummaryAOD","",HLTProcessName),
00083     triggerResultsTag = cms.untracked.InputTag("TriggerResults","",HLTProcessName)   
00084 )
00085 
00086 ##    _____             ____        __ _       _ _   _             
00087 ##   |_   _|_ _  __ _  |  _ \  ___ / _(_)_ __ (_) |_(_) ___  _ __  
00088 ##     | |/ _` |/ _` | | | | |/ _ \ |_| | '_ \| | __| |/ _ \| '_ \ 
00089 ##     | | (_| | (_| | | |_| |  __/  _| | | | | | |_| | (_) | | | |
00090 ##     |_|\__,_|\__, | |____/ \___|_| |_|_| |_|_|\__|_|\___/|_| |_|
00091 ##              |___/
00092 ## 
00093 WElecTagHLT = PassingHLT.clone(
00094     InputProducer = cms.InputTag( "PassingWP90" )
00095     )
00096 
00097 ele_sequence = cms.Sequence(
00098     goodElectrons +
00099     PassingWP90 +
00100     WElecTagHLT
00101     )
00102 
00103 
00104 ##    _____ ___   ____    ____       _          
00105 ##   |_   _( _ ) |  _ \  |  _ \ __ _(_)_ __ ___ 
00106 ##     | | / _ \/\ |_) | | |_) / _` | | '__/ __|
00107 ##     | || (_>  <  __/  |  __/ (_| | | |  \__ \
00108 ##     |_| \___/\/_|     |_|   \__,_|_|_|  |___/
00109 ##                                              
00110 ##   
00111 
00112 MT="sqrt(2*daughter(0).pt*daughter(1).pt*(1 - cos(daughter(0).phi - daughter(1).phi)))"
00113 elecMet = cms.EDProducer("CandViewShallowCloneCombiner",
00114     decay = cms.string("pfMet WElecTagHLT"), # charge coniugate states are implied
00115     checkCharge = cms.bool(False),                           
00116     cut   = cms.string(("daughter(0).pt > %f && daughter(0).pt > %f && "+MT+" > %f") % (MET_CUT_MIN, W_ELECTRON_ET_CUT_MIN, MT_CUT_MIN))
00117 )
00118 elecMetCounter = cms.EDFilter("CandViewCountFilter",
00119                                     src = cms.InputTag("elecMet"),
00120                                     minNumber = cms.uint32(1)
00121                                     )
00122 elecMetFilter = cms.Sequence(elecMet * elecMetCounter)
00123 
00124 import HLTrigger.HLTfilters.hltHighLevel_cfi
00125 WEnuHltFilter = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone(
00126     throw = cms.bool(False),
00127     HLTPaths = ["HLT_Ele*"]
00128     )
00129 
00130 elecMetSeq = cms.Sequence( WEnuHltFilter * ele_sequence * elecMetFilter )