forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged devNewValidation_90X_Customise from repository battibass
- Loading branch information
Showing
35 changed files
with
4,054 additions
and
267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
121 changes: 121 additions & 0 deletions
121
Validation/RecoHI/python/NewMuonValidationHeavyIons_cff.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.