Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skims: definition, matrix, configBuilder - retry #10133

Merged
2 changes: 1 addition & 1 deletion Configuration/Applications/python/ConfigBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -2054,7 +2054,7 @@ def prepare(self, doChecking = False):


outputModuleCfgCode=""
if not 'HARVESTING' in self.stepMap.keys() and not 'SKIM' in self.stepMap.keys() and not 'ALCAHARVEST' in self.stepMap.keys() and not 'ALCAOUTPUT' in self.stepMap.keys() and self.with_output:
if not 'HARVESTING' in self.stepMap.keys() and not 'ALCAHARVEST' in self.stepMap.keys() and not 'ALCAOUTPUT' in self.stepMap.keys() and self.with_output:
outputModuleCfgCode=self.addOutput()

self.addCommon()
Expand Down
8 changes: 4 additions & 4 deletions Configuration/Skimming/python/PDWG_EXOHSCP_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
from TrackingTools.TrackAssociator.DetIdAssociatorESProducer_cff import *
from TrackingTools.TrackAssociator.default_cfi import *

muonEcalDetIds = cms.EDProducer("InterestingEcalDetIdProducer",
muonEcalDetIdsEXOHSCP = cms.EDProducer("InterestingEcalDetIdProducer",
inputCollection = cms.InputTag("muons")
)
highPtTrackEcalDetIds = cms.EDProducer("HighPtTrackEcalDetIdProducer",
Expand All @@ -65,15 +65,15 @@



detIdProduceSeq = cms.Sequence(muonEcalDetIds+highPtTrackEcalDetIds)
detIdProduceSeq = cms.Sequence(muonEcalDetIdsEXOHSCP+highPtTrackEcalDetIds)

reducedHSCPEcalRecHitsEB = cms.EDProducer("ReducedRecHitCollectionProducer",
recHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
interestingDetIdCollections = cms.VInputTag(
#high p_t tracker track ids
cms.InputTag("highPtTrackEcalDetIds"),
#muons
cms.InputTag("muonEcalDetIds")
cms.InputTag("muonEcalDetIdsEXOHSCP")
),
reducedHitsCollection = cms.string('')
)
Expand All @@ -83,7 +83,7 @@
#high p_t tracker track ids
cms.InputTag("highPtTrackEcalDetIds"),
#muons
cms.InputTag("muonEcalDetIds")
cms.InputTag("muonEcalDetIdsEXOHSCP")
),
reducedHitsCollection = cms.string('')
)
Expand Down
58 changes: 55 additions & 3 deletions Configuration/Skimming/python/autoSkim.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,64 @@
autoSkim = {
'BTagCSV' : 'LogError+LogErrorMonitor',
'BTagMu' : 'LogError+LogErrorMonitor',
'HTMHT' : 'LogError+LogErrorMonitor',
'JetHT' : 'HighMET+LogError+LogErrorMonitor',
'DisplacedJet' : 'LogError+LogErrorMonitor',
'MET' : 'LogError+LogErrorMonitor',
'SingleElectron' : 'LogError+LogErrorMonitor',
'SinglePhoton' : 'LogError+LogErrorMonitor',
'DoubleEG' : 'ZElectron+LogError+LogErrorMonitor',
'Tau' : 'LogError+LogErrorMonitor',
'SingleMuon' : 'ZMu+MuTau+LogError+LogErrorMonitor',
'DoubleMuon' : 'LogError+LogErrorMonitor',
'MuonEG' : 'TopMuEG+LogError+LogErrorMonitor',
'DoubleMuonLowMass' : 'LogError+LogErrorMonitor',
'MuOnia' : 'LogError+LogErrorMonitor',
'Charmonium' : 'LogError+LogErrorMonitor',
'NoBPTX' : 'LogError+LogErrorMonitor',
'HcalHPDNoise' : 'LogError+LogErrorMonitor',
'HcalNZS' : 'LogError+LogErrorMonitor',
'HLTPhysics' : 'LogError+LogErrorMonitor',
'ZeroBias' : 'LogError+LogErrorMonitor',
'Commissioning' : 'LogError+LogErrorMonitor',
'Cosmics':'CosmicSP+CosmicTP+LogError+LogErrorMonitor'
}

autoSkimRunI = {
'MinBias':'MuonTrack+BeamBkg+ValSkim+LogError+HSCPSD',
'ZeroBias':'LogError',
'Commissioning':'DT+LogError',
'Cosmics':'CosmicSP+CosmicTP+LogError',
'CosmicsSP':'CosmicSP+LogError',
'Mu' : 'WMu+ZMu+HighMET+LogError',
'EG':'WElectron+ZElectron+HighMET+LogError',
'TopMuEG':'TopMuEG+LogError',
'ZElectron' : 'ZElectron+LogError',
'ZMu' : 'ZMu+LogError',
'Electron':'WElectron+ZElectron+HighMET+LogError',
'Photon':'WElectron+ZElectron+HighMET+LogError+DiPhoton+EXOHPTE',
'JetMETTau':'LogError+Tau',
'JetMET':'HighMET+LogError',
'BTau':'LogError+Tau',
'Jet':'HighMET+LogError',
'METFwd':'HighMET+LogError',
'SingleMu' : 'WMu+ZMu+HighMET+LogError+HWW+HZZ+DiTau+EXOHSCP',
'DoubleMu' : 'WMu+ZMu+HighMET+LogError+HWW+HZZ+EXOHSCP',
'SingleElectron' : 'WElectron+HighMET+LogError+HWW+HZZ+Tau',
'DoubleElectron' : 'ZElectron+LogError+HWW+HZZ',
'MuEG' : 'LogError+HWW+HZZ',
'METBTag': 'HighMET+LogError+EXOHSCP',
'BTag': 'LogError+EXOHSCP',
'MET': 'HighMET+LogError+EXOHSCP',
'HighMET': 'HighMET+LogError',

'HT': 'HighMET+LogError',

'Tau': 'LogError',
'MuTau': 'MuTau+LogError',
'PhotonHad': 'LogError',
'MuHad': 'LogError',
'MultiJet': 'LogError',
'MuOnia': 'LogError',
'ElectronHad': 'LogError',
'TauPlusX': 'LogError',

}

Expand Down
48 changes: 24 additions & 24 deletions DPGAnalysis/Skims/python/HighMETSkim_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


## select events with at least one good PV
pvFilter = cms.EDFilter(
pvFilterHighMETSkim = cms.EDFilter(
"VertexSelector",
src = cms.InputTag("offlinePrimaryVertices"),
cut = cms.string("!isFake && ndof > 4 && abs(z) <= 24 && position.Rho <= 2"),
Expand All @@ -16,86 +16,86 @@


## select events with high pfMET
pfMETSelector = cms.EDFilter(
pfMETSelectorHighMETSkim = cms.EDFilter(
"CandViewSelector",
src = cms.InputTag("pfMet"),
cut = cms.string( "pt()>200" )
)

pfMETCounter = cms.EDFilter(
pfMETCounterHighMETSkim = cms.EDFilter(
"CandViewCountFilter",
src = cms.InputTag("pfMETSelector"),
src = cms.InputTag("pfMETSelectorHighMETSkim"),
minNumber = cms.uint32(1),
)

pfMETSelSeq = cms.Sequence(
pvFilter*
pvFilterHighMETSkim*
##HBHENoiseFilter*
pfMETSelector*
pfMETCounter
pfMETSelectorHighMETSkim*
pfMETCounterHighMETSkim
)



## select events with high caloMET
caloMETSelector = cms.EDFilter(
caloMETSelectorHighMETSkim = cms.EDFilter(
"CandViewSelector",
src = cms.InputTag("caloMetM"),
cut = cms.string( "pt()>200" )
)

caloMETCounter = cms.EDFilter(
caloMETCounterHighMETSkim = cms.EDFilter(
"CandViewCountFilter",
src = cms.InputTag("caloMETSelector"),
src = cms.InputTag("caloMETSelectorHighMETSkim"),
minNumber = cms.uint32(1),
)

caloMETSelSeq = cms.Sequence(
pvFilter*
pvFilterHighMETSkim*
##HBHENoiseFilter*
caloMETSelector*
caloMETCounter
caloMETSelectorHighMETSkim*
caloMETCounterHighMETSkim
)


## select events with high MET dependent on PF and Calo MET Conditions
CondMETSelector = cms.EDProducer(
CondMETSelectorHighMETSkim = cms.EDProducer(
"CandViewShallowCloneCombiner",
decay = cms.string("pfMet caloMetM"),
cut = cms.string(" (daughter(0).pt > 200) || (daughter(0).pt/daughter(1).pt > 2 && daughter(1).pt > 150 ) || (daughter(1).pt/daughter(0).pt > 2 && daughter(0).pt > 150 ) " )
)

CondMETCounter = cms.EDFilter(
CondMETCounterHighMETSkim = cms.EDFilter(
"CandViewCountFilter",
src = cms.InputTag("CondMETSelector"),
src = cms.InputTag("CondMETSelectorHighMETSkim"),
minNumber = cms.uint32(1),
)

CondMETSelSeq = cms.Sequence(
pvFilter*
pvFilterHighMETSkim*
##HBHENoiseFilter*
CondMETSelector*
CondMETCounter
CondMETSelectorHighMETSkim*
CondMETCounterHighMETSkim
)



## select events with PAT METs in MINIAODSIM - remember to keep the right branches in the cmsDriver
miniMETSelector = cms.EDFilter(
miniMETSelectorHighMETSkim = cms.EDFilter(
"CandViewSelector",
src = cms.InputTag("slimmedMETs"),
cut = cms.string( "pt()>200" )
)

miniMETCounter = cms.EDFilter(
miniMETCounterHighMETSkim = cms.EDFilter(
"CandViewCountFilter",
src = cms.InputTag("miniMETSelector"),
src = cms.InputTag("miniMETSelectorHighMETSkim"),
minNumber = cms.uint32(1),
)

miniMETSelSeq = cms.Sequence(
##HBHENoiseFilter*
miniMETSelector*
miniMETCounter
miniMETSelectorHighMETSkim*
miniMETCounterHighMETSkim
)

3 changes: 1 addition & 2 deletions DPGAnalysis/Skims/python/Skims_DPG_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@

from DPGAnalysis.Skims.ZElectronSkim_cff import *
ZElectronPathGsf = cms.Path( zdiElectronSequence )

SKIMStreamZElectron = cms.FilteredStream(
responsible = 'ECAL DPG',
name = 'ZElectron',
Expand All @@ -373,7 +374,6 @@
dataTier = cms.untracked.string('RAW-RECO')
)


#####################

from DPGAnalysis.Skims.HighMETSkim_cff import *
Expand All @@ -395,7 +395,6 @@

#####################


###### MuTau Skim #########
from DPGAnalysis.Skims.MuTauSkim_cff import *
MuTauPath = cms.Path( mutauSkimSequence )
Expand Down
4 changes: 2 additions & 2 deletions DPGAnalysis/Skims/python/WElectronSkim_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@
#--------------------------#
#recompute rho
import RecoJets.Configuration.RecoPFJets_cff
kt6PFJetsForRhoCorrection = RecoJets.Configuration.RecoPFJets_cff.kt6PFJets.clone(
kt6PFJetsForRhoCorrectionWElectronSkim = RecoJets.Configuration.RecoPFJets_cff.kt6PFJets.clone(
doRhoFastjet = True,
Rho_EtaMax = 2.5
)


elecMetSeq = cms.Sequence( WEnuHltFilter * ele_sequence * elecMetFilter * kt6PFJetsForRhoCorrection)
elecMetSeq = cms.Sequence( WEnuHltFilter * ele_sequence * elecMetFilter * kt6PFJetsForRhoCorrectionWElectronSkim)


from Configuration.EventContent.AlCaRecoOutput_cff import OutALCARECOEcalCalElectron
Expand Down
2 changes: 1 addition & 1 deletion DPGAnalysis/Skims/python/ZElectronSkim_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# run on MIONAOD
RUN_ON_MINIAOD = False
#print "ZEE SKIM. RUN ON MINIAOD = ",RUN_ON_MINIAOD

# cuts
ELECTRON_CUT=("pt > 10 && abs(eta)<2.5")
Expand Down Expand Up @@ -55,4 +56,3 @@

#sequences
zdiElectronSequence = cms.Sequence( goodZeeElectrons * identifiedElectrons * diZeeElectrons * diZeeElectronsFilter )

24 changes: 11 additions & 13 deletions DPGAnalysis/Skims/python/ZMuSkim_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,35 @@
### Z -> MuMu candidates

# Get muons of needed quality for Zs
looseMuonsForZ = cms.EDFilter("MuonSelector",
looseMuonsForZMuSkim = cms.EDFilter("MuonSelector",
src = cms.InputTag("muons"),
cut = cms.string('pt > 10 && abs(eta)<2.4 && isGlobalMuon = 1 && isTrackerMuon = 1 && abs(innerTrack().dxy)<2.0'),
filter = cms.bool(True)
)

tightMuonsForZ = cms.EDFilter("MuonSelector",
src = cms.InputTag("looseMuonsForZ"),
tightMuonsForZMuSkim = cms.EDFilter("MuonSelector",
src = cms.InputTag("looseMuonsForZMuSkim"),
cut = cms.string('pt > 20'),
filter = cms.bool(True)
)

# build Z-> MuMu candidates
dimuons = cms.EDProducer("CandViewShallowCloneCombiner",
dimuonsZMuSkim = cms.EDProducer("CandViewShallowCloneCombiner",
checkCharge = cms.bool(False),
cut = cms.string('mass > 30'),
decay = cms.string("tightMuonsForZ looseMuonsForZ")
decay = cms.string("tightMuonsForZMuSkim looseMuonsForZMuSkim")
)

# Z filter
dimuonsFilter = cms.EDFilter("CandViewCountFilter",
src = cms.InputTag("dimuons"),
dimuonsFilterZMuSkim = cms.EDFilter("CandViewCountFilter",
src = cms.InputTag("dimuonsZMuSkim"),
minNumber = cms.uint32(1)
)

# Z Skim sequence
diMuonSelSeq = cms.Sequence(ZMuHLTFilter *
looseMuonsForZ *
tightMuonsForZ *
dimuons *
dimuonsFilter
looseMuonsForZMuSkim *
tightMuonsForZMuSkim *
dimuonsZMuSkim *
dimuonsFilterZMuSkim
)