Skip to content

Commit

Permalink
Merge pull request #22583 from makortel/premixCustomiseReco
Browse files Browse the repository at this point in the history
Perform premixing reco step customizations with premix_stage2 modifier
  • Loading branch information
cmsbuild authored Apr 12, 2018
2 parents cb98d3d + 10494eb commit eed4700
Show file tree
Hide file tree
Showing 36 changed files with 163 additions and 165 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ TrackingParticleConversionRefSelector::TrackingParticleConversionRefSelector(con
void TrackingParticleConversionRefSelector::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("src", edm::InputTag("mix", "MergedTrackTruth"));
descriptions.add("trackingParticleConversionRefSelector", desc);
descriptions.add("trackingParticleConversionRefSelectorDefault", desc);
}

void TrackingParticleConversionRefSelector::produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from CommonTools.RecoAlgos.trackingParticleConversionRefSelectorDefault_cfi import trackingParticleConversionRefSelectorDefault as _trackingParticleConversionRefSelectorDefault
trackingParticleConversionRefSelector = _trackingParticleConversionRefSelectorDefault.clone()

from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(trackingParticleConversionRefSelector, src = "mixData:MergedTrackTruth")
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
maxPhi = cms.double(3.2),
)



from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(trackingParticleRefSelector, src = "mixData:MergedTrackTruth")
16 changes: 7 additions & 9 deletions Configuration/PyReleaseValidation/python/relval_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,6 @@ def genS(fragment,howMuch):
"--datamix" : "PreMix",
"--procModifiers": "premix_stage2",
"--pileup_input" : "dbs:/RelValFS_PREMIXUP15_PU25/%s/GEN-SIM-DIGI-RAW"%(baseDataSetRelease[8],),
"--customise":"SimGeneral/DataMixingModule/customiseForPremixingInput.customiseForPreMixingInput"
},
Kby(100,500),step1FastUpg2015Defaults])

Expand Down Expand Up @@ -1771,17 +1770,17 @@ def gen2018HiMix(fragment,howMuch):

# for premixing: no --pileup_input for replay; GEN-SIM only available for in-time event, from FEVTDEBUGHLT previous step
steps['RECOPRMXUP15_PU25']=merge([
{'--era':'Run2_2016','--customise':'SimGeneral/DataMixingModule/customiseForPremixingInput.customiseForPreMixingInput'}, # temporary replacement for premix; to be brought back to customisePostLS1; DataMixer customize for rerouting inputs to mixed data.
{'--era':'Run2_2016','--procModifiers':'premix_stage2'}, # temporary replacement for premix; to be brought back to customisePostLS1; DataMixer customize for rerouting inputs to mixed data.
step3Up2015Defaults])
steps['RECOPRMXUP15_PU50']=merge([
{'--era':'Run2_50ns','--customise':'SimGeneral/DataMixingModule/customiseForPremixingInput.customiseForPreMixingInput'},
{'--era':'Run2_50ns','--procModifiers':'premix_stage2'},
step3Up2015Defaults50ns])
steps['RECOPRMXUP17_PU25']=merge([
{'--conditions':'auto:phase1_2017_realistic','--era':'Run2_2017','--customise':'SimGeneral/DataMixingModule/customiseForPremixingInput.customiseForPreMixingInput'},
{'--conditions':'auto:phase1_2017_realistic','--era':'Run2_2017','--procModifiers':'premix_stage2'},
step3Up2015Defaults])

steps['RECOPRMXUP18_PU25']=merge([
{'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--customise':'SimGeneral/DataMixingModule/customiseForPremixingInput.customiseForPreMixingInput'},
{'--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018','--procModifiers':'premix_stage2'},
step3Up2015Defaults])
steps['RECOPRMXUP18_PU25_L1TEgDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,RECOSIM,EI,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@L1TEgamma'},steps['RECOPRMXUP18_PU25']])
steps['RECOPRMXUP18_PU25_L1TMuDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,RECOSIM,EI,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@L1TMuon'},steps['RECOPRMXUP18_PU25']])
Expand Down Expand Up @@ -2645,11 +2644,10 @@ def gen2018HiMix(fragment,howMuch):
"--procModifiers": "premix_stage2"},
d])
elif "Reco" in step:
custNew = "SimGeneral/DataMixingModule/customiseForPremixingInput.customiseForPreMixingInput"
if "--customise" in d:
d["--customise"] += ","+custNew
if "--procModifiers" in d:
d["--procModifiers"] += ",premix_stage2"
else:
d["--customise"] = custNew
d["--procModifiers"] = "premix_stage2"
upgradeStepDict[stepNamePUpmx][k] = d

for step in upgradeStepDict.keys():
Expand Down
4 changes: 2 additions & 2 deletions PhysicsTools/RecoAlgos/python/trackingParticleSelector_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
maxPhi = cms.double(3.2),
)



from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(trackingParticleSelector, src = "mixData:MergedTrackTruth")
74 changes: 0 additions & 74 deletions SimGeneral/DataMixingModule/python/customiseForPremixingInput.py

This file was deleted.

3 changes: 3 additions & 0 deletions SimGeneral/TrackingAnalysis/python/simHitTPAssociation_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@
"MuonSimHits:MuonDTHits",
"MuonSimHits:MuonRPCHits"]
)

from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(simHitTPAssocProducer, trackingParticleSrc = "mixData:MergedTrackTruth")
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
fastSim.toModify(trackingParticleNumberOfLayersProducer, simHits=['fastSimProducer:TrackerHits'])
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(trackingParticleNumberOfLayersProducer, simHits = ["g4SimHits:TrackerHitsPixelBarrelLowTof", "g4SimHits:TrackerHitsPixelEndcapLowTof"])

from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(trackingParticleNumberOfLayersProducer, trackingParticles = "mixData:MergedTrackTruth")
11 changes: 11 additions & 0 deletions SimMuon/MCTruth/python/MuonAssociatorByHits_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@
RPCsimhitsXFTag = "mix:MuonSimHitsMuonRPCHits",
ROUList = ['fastSimProducerTrackerHits']
)

from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(muonAssociatorByHitsCommonParameters,
DTdigisimlinkTag = "mixData:simMuonDTDigis",
CSClinksTag = "mixData:MuonCSCStripDigiSimLinks",
CSCwireLinksTag = "mixData:MuonCSCWireDigiSimLinks",
RPCdigisimlinkTag = "mixData:RPCDigiSimLink",
pixelSimLinkSrc = "mixData:PixelDigiSimLink",
stripSimLinkSrc = "mixData:StripDigiSimLink",
)

muonAssociatorByHits = cms.EDProducer("MuonAssociatorEDProducer",
# COMMON CONFIGURATION
Expand Down Expand Up @@ -146,3 +156,4 @@
ignoreMissingTrackCollection = cms.untracked.bool(False),
)

premix_stage2.toModify(muonAssociatorByHits, tpTag = "mixData:MergedTrackTruth")
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
ignoremissingtrackcollection=cms.untracked.bool(False)
)

from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(trackingParticleRecoTrackAsssociation, label_tp = "mixData:MergedTrackTruth")

Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@
pixelSimLinkSrc = cms.InputTag("simSiPixelDigis","Pixel"),
stripSimLinkSrc = cms.InputTag("simSiPixelDigis","Tracker")
)

from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(quickTrackAssociatorByHits,
pixelSimLinkSrc = "mixData:PixelDigiSimLink",
stripSimLinkSrc = "mixData:StripDigiSimLink",
)
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@
)


from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(trackAssociatorByHits,
pixelSimLinkSrc = "mixData:PixelDigiSimLink",
stripSimLinkSrc = "mixData:StripDigiSimLink",
)
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ TrackingParticleBHadronRefSelector::TrackingParticleBHadronRefSelector(const edm
void TrackingParticleBHadronRefSelector::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("src", edm::InputTag("mix", "MergedTrackTruth"));
descriptions.add("trackingParticleBHadronRefSelector", desc);
descriptions.add("trackingParticleBHadronRefSelectorDefault", desc);
}

void TrackingParticleBHadronRefSelector::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) {
Expand Down
2 changes: 2 additions & 0 deletions SimTracker/TrackHistory/python/TrackHistory_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@
)


from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(trackHistory, trackingTruth = "mixData:MergedTrackTruth")
8 changes: 8 additions & 0 deletions SimTracker/TrackHistory/python/TrackQuality_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,11 @@
stripSimLinkSrc = cms.InputTag("simSiStripDigis")
)
)

from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(trackQuality,
hitAssociator = dict(
pixelSimLinkSrc = "mixData:PixelDigiSimLink",
stripSimLinkSrc = "mixData:StripDigiSimLink",
)
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from SimTracker.TrackHistory.trackingParticleBHadronRefSelectorDefault_cfi import trackingParticleBHadronRefSelectorDefault as _trackingParticleBHadronRefSelectorDefault
trackingParticleBHadronRefSelector = _trackingParticleBHadronRefSelectorDefault.clone()

from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(trackingParticleBHadronRefSelector, src = "mixData:MergedTrackTruth")
11 changes: 9 additions & 2 deletions SimTracker/TrackerHitAssociation/python/tpClusterProducer_cfi.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
import FWCore.ParameterSet.Config as cms

from SimTracker.TrackerHitAssociation.tpClusterProducerDefault_cfi import *
from SimTracker.TrackerHitAssociation.tpClusterProducerDefault_cfi import tpClusterProducerDefault as _tpClusterProducerDefault

tpClusterProducer = tpClusterProducerDefault.clone()
tpClusterProducer = _tpClusterProducerDefault.clone()

from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(
tpClusterProducer,
pixelSimLinkSrc = cms.InputTag("simSiPixelDigis", "Pixel"),
phase2OTSimLinkSrc = cms.InputTag("simSiPixelDigis","Tracker")
)

from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(tpClusterProducer,
trackingParticleSrc = "mixData:MergedTrackTruth",
pixelSimLinkSrc = "mixData:PixelDigiSimLink",
stripSimLinkSrc = "mixData:StripDigiSimLink",
)
7 changes: 5 additions & 2 deletions Validation/GlobalRecHits/python/globalrechits_analyze_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,8 @@
ECalEBSrc = cms.InputTag("ecalRecHit","EcalRecHitsEB")
)



from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(globalrechitsanalyze,
pixelSimLinkSrc = "mixData:PixelDigiSimLink",
stripSimLinkSrc = "mixData:StripDigiSimLink",
)
5 changes: 5 additions & 0 deletions Validation/HcalDigis/python/HLTHcalDigisParam_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
hltHCALdigisAnalyzer.TestNumber = cms.bool(False)
hltHCALdigisAnalyzer.hep17 = cms.bool(False)

from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(hltHCALdigisAnalyzer,
dataTPs = "DMHcalTriggerPrimitiveDigis",
)

from Configuration.Eras.Modifier_run2_HCAL_2017_cff import run2_HCAL_2017
run2_HCAL_2017.toModify(hltHCALdigisAnalyzer,
TestNumber = cms.bool(True)
Expand Down
5 changes: 5 additions & 0 deletions Validation/HcalDigis/python/HcalDigisParam_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
from Configuration.Eras.Modifier_fastSim_cff import fastSim
fastSim.toModify(hcaldigisAnalyzer, simHits = "fastSimProducer:HcalHits")

from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(hcaldigisAnalyzer,
dataTPs = "DMHcalTriggerPrimitiveDigis",
)

from Configuration.Eras.Modifier_run2_HCAL_2017_cff import run2_HCAL_2017
run2_HCAL_2017.toModify(hcaldigisAnalyzer,
TestNumber = cms.bool(True)
Expand Down
2 changes: 2 additions & 0 deletions Validation/RPCRecHits/python/rpcRecHitValidation_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
from Configuration.Eras.Modifier_fastSim_cff import fastSim
fastSim.toModify(rpcRecHitV, simHit = "MuonSimHits:MuonRPCHits")

from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(rpcRecHitV, simTrack = "mixData:MergedTrackTruth")
6 changes: 6 additions & 0 deletions Validation/RecoMuon/python/MuonTrackValidator_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,9 @@
run3_GEM.toModify( muonTrackValidator, useGEMs = cms.bool(True) )
from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
phase2_muon.toModify( muonTrackValidator, useME0 = cms.bool(True) )

from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(muonTrackValidator,
label_tp_effic = "mixData:MergedTrackTruth",
label_tp_fake = "mixData:MergedTrackTruth",
)
3 changes: 3 additions & 0 deletions Validation/RecoMuon/python/RecoMuonValidator_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,6 @@
# Number of sim,reco Tracks #
nTrks = cms.untracked.uint32(50)
)

from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(recoMuonValidator, simLabel = "mixData:MergedTrackTruth")
4 changes: 2 additions & 2 deletions Validation/RecoMuon/python/associators_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import SimTracker.TrackAssociatorProducers.quickTrackAssociatorByHits_cfi
trackAssociatorByHits = SimTracker.TrackAssociatorProducers.quickTrackAssociatorByHits_cfi.quickTrackAssociatorByHits.clone()

tpToTkmuTrackAssociation = cms.EDProducer('TrackAssociatorEDProducer',
from SimTracker.TrackAssociation.trackingParticleRecoTrackAsssociation_cfi import trackingParticleRecoTrackAsssociation as _trackingParticleRecoTrackAsssociation
tpToTkmuTrackAssociation = _trackingParticleRecoTrackAsssociation.clone(
associator = cms.InputTag('trackAssociatorByHits'),
label_tp = cms.InputTag('mix', 'MergedTrackTruth'),
# label_tr = cms.InputTag('generalTracks')
label_tr = cms.InputTag('probeTracks')
)
Expand Down
9 changes: 5 additions & 4 deletions Validation/RecoMuon/python/selectors_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
stableOnly = cms.bool(True), # discard decays in flight from the signal event
chargedOnly = cms.bool(True)
)
from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(muonTPSet, src = "mixData:MergedTrackTruth")

me0MuonTPSet = cms.PSet(
src = cms.InputTag("mix", "MergedTrackTruth"),
me0MuonTPSet = muonTPSet.clone(
pdgId = cms.vint32(13, -13),
tip = cms.double(3.5),
lip = cms.double(30.0),
Expand All @@ -33,8 +34,7 @@
chargedOnly = cms.bool(True)
)

displacedMuonTPSet = cms.PSet(
src = cms.InputTag("mix", "MergedTrackTruth"),
displacedMuonTPSet = muonTPSet.clone(
pdgId = cms.vint32(13, -13),
tip = cms.double(85.), # radius to have at least the 3 outermost TOB layers
lip = cms.double(210.), # z to have at least the 3 outermost TEC layers
Expand Down Expand Up @@ -63,6 +63,7 @@
stableOnly = cms.bool(True), # accept only TP from the Generator (linked to GenParticles)
chargedOnly = cms.bool(True)
)
premix_stage2.toModify(cosmicMuonTPSet, src = "mixData:MergedTrackTruth")

#muonTP = cms.EDFilter("TrackingParticleSelector",
# muonTPSet
Expand Down
7 changes: 7 additions & 0 deletions Validation/RecoTrack/python/MultiTrackValidator_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,10 @@

from Configuration.Eras.Modifier_fastSim_cff import fastSim
fastSim.toModify(multiTrackValidator, sim = ['fastSimProducer:TrackerHits'])

from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(multiTrackValidator,
label_tp_effic = "mixData:MergedTrackTruth",
label_tp_fake = "mixData:MergedTrackTruth",
label_tv = "mixData:MergedTrackTruth",
)
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@
)


from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(PixelTrackingRecHitsValid,
pixelSimLinkSrc = "mixData:PixelDigiSimLink",
stripSimLinkSrc = "mixData:StripDigiSimLink",
)
Original file line number Diff line number Diff line change
Expand Up @@ -998,4 +998,8 @@
associateStrip = cms.bool(True)
)


from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
premix_stage2.toModify(StripTrackingRecHitsValid,
pixelSimLinkSrc = "mixData:PixelDigiSimLink",
stripSimLinkSrc = "mixData:StripDigiSimLink",
)
Loading

0 comments on commit eed4700

Please sign in to comment.