Skip to content

Commit

Permalink
Merged devNewValidation_90X_Customise from repository battibass
Browse files Browse the repository at this point in the history
  • Loading branch information
abbiendi committed Feb 3, 2017
2 parents 8b8e202 + d863012 commit 9f495b7
Show file tree
Hide file tree
Showing 35 changed files with 4,054 additions and 267 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

from Validation.Configuration.globalValidationCosmics_cff import *

prevalidation = cms.Sequence(globalPrevalidationCosmics)
prevalidationCosmics = cms.Sequence(globalPrevalidationCosmics)

validation = cms.Sequence(cms.SequencePlaceholder("mix")
validationCosmics = cms.Sequence(cms.SequencePlaceholder("mix")
*globalValidationCosmics
)
8 changes: 8 additions & 0 deletions Configuration/StandardSequences/python/Validation_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,18 @@
from JetMETCorrections.Type1MET.pfMETCorrectionType0_cfi import *
from Validation.TrackingMCTruth.trackingTruthValidation_cfi import *
from Validation.RecoTrack.TrackValidation_cff import *
#
from Validation.RecoMuon.muonValidation_cff import *
# add new muon validation
#from Validation.RecoMuon.NewMuonValidation_cff import *
#
from Validation.MuonIsolation.MuIsoVal_cff import *
from Validation.MuonIdentification.muonIdVal_cff import *
#
from Validation.RecoMuon.muonValidationHLT_cff import *
# add new muon validation
#from Validation.RecoMuon.NewMuonValidationHLT_cff import *
#
from Validation.EventGenerator.BasicGenValidation_cff import *
# miniAOD
from Validation.RecoParticleFlow.miniAODValidation_cff import *
Expand Down
2 changes: 1 addition & 1 deletion HLTriggerOffline/Common/python/HLTValidationHarvest_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
hltpostvalidation = cms.Sequence(
postProcessorHLTtrackingSequence
+postProcessorHLTvertexing
+HLTMuonPostVal
+HLTMuonPostVal
+HLTTauPostVal
+EgammaPostVal
+topHLTriggerValidationHarvest
Expand Down
5 changes: 0 additions & 5 deletions HLTriggerOffline/Muon/python/HLTMuonPostVal_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,3 @@
hltMuonPostProcessors
)

HLTMuonPostVal_FastSim = cms.Sequence(
recoMuonPostProcessorsHLTFastSim +
hltMuonPostProcessors
)

147 changes: 147 additions & 0 deletions SimMuon/MCTruth/python/NewMuonAssociatorByHits_cfi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
import FWCore.ParameterSet.Config as cms


NewMuonAssociatorByHitsCommonParameters = cms.PSet(
dumpInputCollections = cms.untracked.bool(False),
#
#....... general input parameters
#
# include invalid muon hits
includeZeroHitMuons = cms.bool(True),
#
# accept to match only tracker/muon stub of globalMuons
acceptOneStubMatchings = cms.bool(False),
#
# switches to be set according to the input Track collection
UseTracker = cms.bool(True),
UseMuon = cms.bool(True),
#
# cuts for the muon stub
AbsoluteNumberOfHits_muon = cms.bool(False),
NHitCut_muon = cms.uint32(0),
EfficiencyCut_muon = cms.double(0.),
PurityCut_muon = cms.double(0.),
#
# cuts for the tracker stub
AbsoluteNumberOfHits_track = cms.bool(False),
NHitCut_track = cms.uint32(0),
EfficiencyCut_track = cms.double(0.),
PurityCut_track = cms.double(0.),
#
# switches for the tracker stub
UsePixels = cms.bool(True),
UseGrouped = cms.bool(True),
UseSplitting = cms.bool(True),
ThreeHitTracksAreSpecial = cms.bool(False),
#
# for DT Hit associator
crossingframe = cms.bool(False),
simtracksTag = cms.InputTag("g4SimHits"),
simtracksXFTag = cms.InputTag("mix","g4SimHits"),
#
DTsimhitsTag = cms.InputTag("g4SimHits","MuonDTHits"),
DTsimhitsXFTag = cms.InputTag("mix","g4SimHitsMuonDTHits"),
DTdigiTag = cms.InputTag("simMuonDTDigis"),
DTdigisimlinkTag = cms.InputTag("simMuonDTDigis"),
DTrechitTag = cms.InputTag("dt1DRecHits"),
#
dumpDT = cms.bool(False),
links_exist = cms.bool(True),
associatorByWire = cms.bool(False),
#
# for CSC Hit associator
CSCsimHitsTag = cms.InputTag("g4SimHits","MuonCSCHits"),
CSCsimHitsXFTag = cms.InputTag("mix","g4SimHitsMuonCSCHits"),
CSClinksTag = cms.InputTag("simMuonCSCDigis","MuonCSCStripDigiSimLinks"),
CSCwireLinksTag = cms.InputTag("simMuonCSCDigis","MuonCSCWireDigiSimLinks"),
#
# for RPC Hit associator
RPCsimhitsTag = cms.InputTag("g4SimHits","MuonRPCHits"),
RPCsimhitsXFTag = cms.InputTag("mix","g4SimHitsMuonRPCHits"),
RPCdigisimlinkTag = cms.InputTag("simMuonRPCDigis","RPCDigiSimLink"),
#
# for GEM Hit associator
useGEMs = cms.bool(False),
GEMsimhitsTag = cms.InputTag("g4SimHits","MuonGEMHits"),
GEMsimhitsXFTag = cms.InputTag("mix","g4SimHitsMuonGEMHits"),
GEMdigisimlinkTag = cms.InputTag("simMuonGEMDigis","GEM"),
#
# for Tracker Hit associator
#
associatePixel = cms.bool(True),
associateStrip = cms.bool(True),
pixelSimLinkSrc = cms.InputTag("simSiPixelDigis"),
stripSimLinkSrc = cms.InputTag("simSiStripDigis"),
associateRecoTracks = cms.bool(True),
#
ROUList = cms.vstring('TrackerHitsTIBLowTof',
'TrackerHitsTIBHighTof',
'TrackerHitsTIDLowTof',
'TrackerHitsTIDHighTof',
'TrackerHitsTOBLowTof',
'TrackerHitsTOBHighTof',
'TrackerHitsTECLowTof',
'TrackerHitsTECHighTof',
'TrackerHitsPixelBarrelLowTof',
'TrackerHitsPixelBarrelHighTof',
'TrackerHitsPixelEndcapLowTof',
'TrackerHitsPixelEndcapHighTof'),
#
# to associate to reco::Muon segments
inputDTRecSegment4DCollection = cms.InputTag("dt4DSegments"),
inputCSCSegmentCollection = cms.InputTag("cscSegments"),
)


from Configuration.Eras.Modifier_fastSim_cff import fastSim
if fastSim.isChosen():
#if True:
obj = NewMuonAssociatorByHitsCommonParameters
obj.simtracksTag = "famosSimHits"
obj.DTsimhitsTag = "MuonSimHits:MuonDTHits"
obj.CSCsimHitsTag = "MuonSimHits:MuonCSCHits"
obj.RPCsimhitsTag = "MuonSimHits:MuonRPCHits"
obj.simtracksXFTag = "mix:famosSimHits"
obj.DTsimhitsXFTag = "mix:MuonSimHitsMuonDTHits"
obj.CSCsimHitsXFTag = "mix:MuonSimHitsMuonCSCHits"
obj.RPCsimhitsXFTag = "mix:MuonSimHitsMuonRPCHits"
obj.ROUList = ['famosSimHitsTrackerHits']


NewMuonAssociatorByHits = cms.EDProducer("MuonAssociatorEDProducer",
# COMMON CONFIGURATION
NewMuonAssociatorByHitsCommonParameters,
# for Muon Track association
#
# input collections
#
# ... reco::Track collection
# tracksTag = cms.InputTag("standAloneMuons"),
# tracksTag = cms.InputTag("standAloneMuons","UpdatedAtVtx"),
# tracksTag = cms.InputTag("standAloneSETMuons"),
# tracksTag = cms.InputTag("standAloneSETMuons","UpdatedAtVtx"),
# tracksTag = cms.InputTag("cosmicMuons"),
tracksTag = cms.InputTag("globalMuons"),
# tracksTag = cms.InputTag("tevMuons","firstHit"),
# tracksTag = cms.InputTag("tevMuons","picky"),
# tracksTag = cms.InputTag("globalSETMuons"),
# tracksTag = cms.InputTag("globalCosmicMuons"),
# tracksTag = cms.InputTag("generalTracks"),
# tracksTag = cms.InputTag("ctfWithMaterialTracksP5LHCNavigation"),
# tracksTag = cms.InputTag("hltL2Muons"),
# tracksTag = cms.InputTag("hltL2Muons","UpdatedAtVtx"),
# tracksTag = cms.InputTag("hltL3Muons")
# tracksTag = cms.InputTag("hltL3Muons","L2Seeded")
# tracksTag = cms.InputTag("hltL3TkTracksFromL2")
#
# ... TrackingParticle collection
tpTag = cms.InputTag("mix","MergedTrackTruth"),
ignoreMissingTrackCollection = cms.untracked.bool(False),
)

from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
run3_GEM.toModify( NewMuonAssociatorByHits, useGEMs = cms.bool(True) )
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify( NewMuonAssociatorByHits, pixelSimLinkSrc = "simSiPixelDigis:Pixel" )
phase2_tracker.toModify( NewMuonAssociatorByHits, stripSimLinkSrc = "simSiPixelDigis:Tracker" )

2 changes: 2 additions & 0 deletions Validation/Configuration/python/globalValidation_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
from Validation.MuonCSCDigis.cscDigiValidation_cfi import *
from Validation.MuonRPCDigis.validationMuonRPCDigis_cfi import *
from Validation.RecoMuon.muonValidation_cff import *
# add new muon validation
#from Validation.RecoMuon.NewMuonValidation_cff import *
from Validation.MuonIsolation.MuIsoVal_cff import *
from Validation.MuonIdentification.muonIdVal_cff import *
from Validation.Mixing.mixCollectionValidation_cfi import *
Expand Down
3 changes: 3 additions & 0 deletions Validation/Configuration/python/postValidation_cff.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import FWCore.ParameterSet.Config as cms

from Validation.RecoMuon.PostProcessor_cff import *
# add new muon validation
#from Validation.RecoMuon.NewPostProcessor_cff import *
from Validation.RecoTrack.PostProcessorTracker_cfi import *
from Validation.MuonIsolation.PostProcessor_cff import *
from Validation.CaloTowers.CaloTowersPostProcessor_cff import *
Expand All @@ -23,6 +25,7 @@
postProcessorTrackSequence
+ postProcessorVertexSequence
)

postValidation = cms.Sequence(
recoMuonPostProcessors
+ postValidationTracking
Expand Down
121 changes: 121 additions & 0 deletions Validation/RecoHI/python/NewMuonValidationHeavyIons_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
import FWCore.ParameterSet.Config as cms

from Validation.RecoHI.track_selectors_cff import *

# MuonAssociation labels; hit-by-hit matching only,MuonAssociator
#
import SimMuon.MCTruth.NewMuonAssociatorByHits_cfi
MABH = SimMuon.MCTruth.NewMuonAssociatorByHits_cfi.NewMuonAssociatorByHits.clone()
# DEFAULTS ###################################
# EfficiencyCut_track = cms.double(0.),
# PurityCut_track = cms.double(0.),
# EfficiencyCut_muon = cms.double(0.),
# PurityCut_muon = cms.double(0.),
# includeZeroHitMuons = cms.bool(True),
# acceptOneStubMatchings = cms.bool(False),
##############################################
MABH.tpTag = 'cutsTpMuons'
MABH.acceptOneStubMatchings = cms.bool(True) # OLD setting: should be kept at default ("False")
#MABH.EfficiencyCut_track = 0.5
MABH.PurityCut_track = 0.75
MABH.PurityCut_muon = 0.75
#MABH.includeZeroHitMuons = False
################################################

# sim to tracker tracks,
NEWtpToTkMuonAssociation = MABH.clone()
NEWtpToTkMuonAssociation.tracksTag = 'cutsRecoTrkMuons'
NEWtpToTkMuonAssociation.UseTracker = True
NEWtpToTkMuonAssociation.UseMuon = False

# sim to sta, and sta:updatedAtVtx
NEWtpToStaMuonAssociation = MABH.clone()
NEWtpToStaMuonAssociation.tracksTag = 'standAloneMuons'
NEWtpToStaMuonAssociation.UseTracker = False
NEWtpToStaMuonAssociation.UseMuon = True

NEWtpToStaUpdMuonAssociation = MABH.clone()
NEWtpToStaUpdMuonAssociation.tracksTag = 'standAloneMuons:UpdatedAtVtx'
NEWtpToStaUpdMuonAssociation.UseTracker = False
NEWtpToStaUpdMuonAssociation.UseMuon = True

# sim to glb track
NEWtpToGlbMuonAssociation = MABH.clone()
NEWtpToGlbMuonAssociation.tracksTag = 'globalMuons'
NEWtpToGlbMuonAssociation.UseTracker = True
NEWtpToGlbMuonAssociation.UseMuon = True


# Muon association sequences
# (some are commented out until timing is addressed)
NEWhiMuonAssociation_seq = cms.Sequence(
NEWtpToTkMuonAssociation+
NEWtpToStaMuonAssociation+
NEWtpToStaUpdMuonAssociation+
NEWtpToGlbMuonAssociation
)

#----------------------------------------

from Validation.RecoMuon.RecoMuonValidator_cff import *
from Validation.RecoMuon.histoParameters_cff import *
from SimTracker.TrackAssociation.LhcParametersDefinerForTP_cfi import *

import Validation.RecoMuon.NewMuonTrackValidator_cfi

# RecoMuonValidators labels
NEWtrkMuonTrackVTrackAssoc = Validation.RecoMuon.NewMuonTrackValidator_cfi.NewMuonTrackValidator.clone()
NEWtrkMuonTrackVTrackAssoc.associatormap = 'NEWtpToTkMuonAssociation'
NEWtrkMuonTrackVTrackAssoc.associators = ('MuonAssociationByHits',)
NEWtrkMuonTrackVTrackAssoc.label = ['cutsRecoTrkMuons']
NEWtrkMuonTrackVTrackAssoc.label_tp_effic = 'cutsTpMuons'
NEWtrkMuonTrackVTrackAssoc.label_tp_fake = 'cutsTpMuons'
NEWtrkMuonTrackVTrackAssoc.muonHistoParameters = trkMuonHistoParameters

NEWglbMuonTrackVMuonAssoc = Validation.RecoMuon.NewMuonTrackValidator_cfi.NewMuonTrackValidator.clone()
NEWglbMuonTrackVMuonAssoc.associatormap = 'NEWtpToGlbMuonAssociation'
NEWglbMuonTrackVMuonAssoc.label = ['globalMuons']
NEWglbMuonTrackVMuonAssoc.label_tp_effic = 'cutsTpMuons'
NEWglbMuonTrackVMuonAssoc.label_tp_fake = 'cutsTpMuons'
NEWglbMuonTrackVMuonAssoc.muonHistoParameters = glbMuonHistoParameters

NEWstaMuonTrackVMuonAssoc = Validation.RecoMuon.NewMuonTrackValidator_cfi.NewMuonTrackValidator.clone()
NEWstaMuonTrackVMuonAssoc.associatormap = 'NEWtpToStaMuonAssociation'
NEWstaMuonTrackVMuonAssoc.label = ('standAloneMuons',)
NEWstaMuonTrackVMuonAssoc.label_tp_effic = 'cutsTpMuons'
NEWstaMuonTrackVMuonAssoc.label_tp_fake = 'cutsTpMuons'
NEWstaMuonTrackVMuonAssoc.muonHistoParameters = staMuonHistoParameters

NEWstaUpdMuonTrackVMuonAssoc = Validation.RecoMuon.NewMuonTrackValidator_cfi.NewMuonTrackValidator.clone()
NEWstaUpdMuonTrackVMuonAssoc.associatormap = 'NEWtpToStaUpdMuonAssociation'
NEWstaUpdMuonTrackVMuonAssoc.label = ('standAloneMuons:UpdatedAtVtx',)
NEWstaUpdMuonTrackVMuonAssoc.label_tp_effic = 'cutsTpMuons'
NEWstaUpdMuonTrackVMuonAssoc.label_tp_fake = 'cutsTpMuons'
NEWstaUpdMuonTrackVMuonAssoc.muonHistoParameters = staUpdMuonHistoParameters


#change pt max of track validator
NEWtrkMuonTrackVTrackAssoc.maxPt = cms.double(100)
NEWglbMuonTrackVMuonAssoc.maxPt = cms.double(100)
NEWstaMuonTrackVMuonAssoc.maxPt = cms.double(100)
NEWstaUpdMuonTrackVMuonAssoc.maxPt = cms.double(100)

# Muon validation sequences
NEWhiMuonValidation_seq = cms.Sequence(
NEWtrkMuonTrackVTrackAssoc+
NEWstaMuonTrackVMuonAssoc+
NEWstaUpdMuonTrackVMuonAssoc+
NEWglbMuonTrackVMuonAssoc
)

#----------------------------------------

# HI muon prevalidation
NEWhiRecoMuonPrevalidation = cms.Sequence(
cutsRecoTrkMuons
* cutsTpMuons
* NEWhiMuonAssociation_seq
)

# HI muon validation sequence
NEWhiRecoMuonValidation = cms.Sequence( NEWhiMuonValidation_seq )
5 changes: 2 additions & 3 deletions Validation/RecoHI/python/globalValidationHeavyIons_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@


# prevalidation sequence for all EDFilters and EDProducers
#
globalPrevalidationHI = cms.Sequence(
hiTrackPrevalidation
* hiRecoMuonPrevalidation

)


Expand All @@ -49,7 +49,6 @@

+ hiTrackValidation # validation of 'hiGeneralTracks'
+ hiJetValidation # validation of pileup jet finders
+ hiRecoMuonValidation # validation of offline muon reco

+ hiRecoMuonValidation # validation of offline muon reco
)

15 changes: 1 addition & 14 deletions Validation/RecoHI/python/muonValidationHeavyIons_cff.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
import FWCore.ParameterSet.Config as cms

from Validation.RecoMuon.muonValidation_cff import *

# pt-selection of reco tracks
import PhysicsTools.RecoAlgos.recoTrackSelector_cfi
cutsRecoTrkMuons = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone()
cutsRecoTrkMuons.src = "hiGeneralTracks"
cutsRecoTrkMuons.quality = []
cutsRecoTrkMuons.ptMin = 0.0

# pt-selection of tracking particles
import PhysicsTools.RecoAlgos.trackingParticleSelector_cfi
cutsTpMuons = PhysicsTools.RecoAlgos.trackingParticleSelector_cfi.trackingParticleSelector.clone()
cutsTpMuons.ptMin = 0.0

#----------------------------------------
from Validation.RecoHI.track_selectors_cff import *

# MuonAssociation labels; hit-by-hit matching only,MuonAssociator

Expand Down
Loading

0 comments on commit 9f495b7

Please sign in to comment.