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

Drop type specs in RecoHI {Configuration, HiTracking} #32386

Merged
merged 8 commits into from
Dec 16, 2020
62 changes: 31 additions & 31 deletions RecoHI/Configuration/python/Reconstruction_hiPF_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,38 @@
# run a trimmed down PF sequence with heavy-ion vertex, no conversions, nucl int, etc.

from RecoParticleFlow.PFProducer.particleFlowEGamma_cff import *
particleFlowEGamma.vertexCollection = cms.InputTag("hiSelectedVertex")
gedGsfElectronCores.ctfTracks = cms.InputTag("hiGeneralTracks")
gedGsfElectronsTmp.ctfTracksTag = cms.InputTag("hiGeneralTracks")
gedGsfElectronsTmp.vtxTag = cms.InputTag("hiSelectedVertex")
gedGsfElectronsTmp.preselection.minSCEtBarrel = cms.double(15.0)
gedGsfElectronsTmp.preselection.minSCEtEndcaps = cms.double(15.0)
gedGsfElectronsTmp.fillConvVtxFitProb = cms.bool(False)

gedPhotonsTmp.primaryVertexProducer = cms.InputTag("hiSelectedVertex")
gedPhotonsTmp.isolationSumsCalculatorSet.trackProducer = cms.InputTag("hiGeneralTracks")
gedPhotons.primaryVertexProducer = cms.InputTag("hiSelectedVertex")
gedPhotons.isolationSumsCalculatorSet.trackProducer = cms.InputTag("hiGeneralTracks")
photonIDValueMaps.vertices = cms.InputTag("hiSelectedVertex")
particleFlowEGamma.vertexCollection = "hiSelectedVertex"
gedGsfElectronCores.ctfTracks = "hiGeneralTracks"
gedGsfElectronsTmp.ctfTracksTag = "hiGeneralTracks"
gedGsfElectronsTmp.vtxTag = "hiSelectedVertex"
gedGsfElectronsTmp.preselection.minSCEtBarrel = 15.0
gedGsfElectronsTmp.preselection.minSCEtEndcaps = 15.0
gedGsfElectronsTmp.fillConvVtxFitProb = False

gedPhotonsTmp.primaryVertexProducer = "hiSelectedVertex"
gedPhotonsTmp.isolationSumsCalculatorSet.trackProducer = "hiGeneralTracks"
gedPhotons.primaryVertexProducer = "hiSelectedVertex"
gedPhotons.isolationSumsCalculatorSet.trackProducer = "hiGeneralTracks"
photonIDValueMaps.vertices = "hiSelectedVertex"
from RecoHI.HiEgammaAlgos.photonIsolationHIProducer_cfi import photonIsolationHIProducer
photonIsolationHIProducerGED = photonIsolationHIProducer.clone(photonProducer=cms.InputTag("gedPhotonsTmp"))
photonIsolationHIProducerGED = photonIsolationHIProducer.clone(photonProducer="gedPhotonsTmp")

#These are set for consistency w/ HiElectronSequence, but these cuts need to be studied
gedGsfElectronsTmp.preselection.maxHOverEBarrelCone = cms.double(0.25)
gedGsfElectronsTmp.preselection.maxHOverEEndcapsCone = cms.double(0.25)
gedGsfElectronsTmp.preselection.maxHOverEBarrelTower = cms.double(0.0)
gedGsfElectronsTmp.preselection.maxHOverEEndcapsTower = cms.double(0.0)
gedGsfElectronsTmp.preselection.maxEOverPBarrel = cms.double(2.)
gedGsfElectronsTmp.preselection.maxEOverPEndcaps = cms.double(2.)

ootPhotonsTmp.primaryVertexProducer = cms.InputTag("hiSelectedVertex")
ootPhotonsTmp.isolationSumsCalculatorSet.trackProducer = cms.InputTag("hiGeneralTracks")
ootPhotons.primaryVertexProducer = cms.InputTag("hiSelectedVertex")
ootPhotons.isolationSumsCalculatorSet.trackProducer = cms.InputTag("hiGeneralTracks")
gedGsfElectronsTmp.preselection.maxHOverEBarrelCone = 0.25
gedGsfElectronsTmp.preselection.maxHOverEEndcapsCone = 0.25
gedGsfElectronsTmp.preselection.maxHOverEBarrelTower = 0.0
gedGsfElectronsTmp.preselection.maxHOverEEndcapsTower = 0.0
gedGsfElectronsTmp.preselection.maxEOverPBarrel = 2.
gedGsfElectronsTmp.preselection.maxEOverPEndcaps = 2.

ootPhotonsTmp.primaryVertexProducer = "hiSelectedVertex"
ootPhotonsTmp.isolationSumsCalculatorSet.trackProducer = "hiGeneralTracks"
ootPhotons.primaryVertexProducer = "hiSelectedVertex"
ootPhotons.isolationSumsCalculatorSet.trackProducer = "hiGeneralTracks"

from RecoParticleFlow.Configuration.RecoParticleFlow_cff import *

mvaElectrons.vertexTag = cms.InputTag("hiSelectedVertex")
mvaElectrons.vertexTag = "hiSelectedVertex"

particleFlowBlock.elementImporters = cms.VPSet(
cms.PSet( importerName = cms.string("GSFTrackImporter"),
Expand Down Expand Up @@ -79,16 +79,16 @@
source = cms.InputTag("particleFlowClusterPS") )
)

particleFlowTmp.postMuonCleaning = cms.bool(False)
particleFlowTmp.vertexCollection = cms.InputTag("hiSelectedVertex")
particleFlowTmp.muons = cms.InputTag("hiMuons1stStep")
particleFlowTmp.usePFConversions = cms.bool(False)
particleFlowTmp.postMuonCleaning = False
particleFlowTmp.vertexCollection = "hiSelectedVertex"
particleFlowTmp.muons = "hiMuons1stStep"
particleFlowTmp.usePFConversions = False

pfNoPileUpIso.enable = False
pfPileUpIso.Enable = False
pfNoPileUp.enable = False
pfPileUp.Enable = False
particleFlow.Muons = cms.InputTag("muons","hiMuons1stStep2muonsMap")
particleFlow.Muons = "muons:hiMuons1stStep2muonsMap"


# local reco must run before electrons (RecoHI/HiEgammaAlgos), due to PF integration
Expand Down
10 changes: 6 additions & 4 deletions RecoHI/Configuration/python/Reconstruction_hiSignal_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@

#Tracks
hiSignalGlobalPrimTracks = hiGlobalPrimTracks.clone()
hiSignalSelectedTracks = hiSelectedTracks.clone()
hiSelectedTracks.src = cms.InputTag("hiSignalGlobalPrimTracks")
hiSignalSelectedTracks = hiSelectedTracks.clone(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here the hiSignalSelectedTracks are updated with the input collection "hiSignalGlobalPrimTracks", but then later the heavyIonTrackingTask is feeed with the (unmodified) hiSelectedTracks: I wonder how it can even work
I suppose you already tested it, e.g. with the HI workflows in the matrix tests (140.43, 140.46, 158.01): but it is possible that you wouldn't get an error in that case, because it does not seem to me that this Reconstruction_hiSignal_cff.py is ever included in any actual reconstruction sequence.

Let then involve the HI reco contact, @mandrenguyen :

  • I already noticed in my comment for the previous version of this PR that already the original formulation of this PR was bugged; I don't think this update is actually fixing it
  • I don't see this Reconstruction_hiSignal_cff.py ever used in the configs in CMSSW
  • Do you have any suggestion (based on a possible usage of this python snippet) for fixing it? If this file isn't really used anywhere, wouldn't it be more convenient to profit of this PR in order to completely remove it, instead of spending more efforts in trying to fix it?

src = "hiSignalGlobalPrimTracks"
)
heavyIonTrackingTask = cms.Task(hiPixelVerticesTask
,hiPrimSeedsTask
,hiPrimTrackCandidates
Expand All @@ -38,8 +39,9 @@
runjets = cms.Sequence(runjetsTask)

#Muons
hiSignalGlobalMuons = globalMuons.clone()
hiSignalGlobalMuons.TrackerCollectionLabel = 'hiSignalGlobalPrimTracks'
hiSignalGlobalMuons = globalMuons.clone(
TrackerCollectionLabel = 'hiSignalGlobalPrimTracks'
)
muontrackingTask = cms.Task(standAloneMuonSeedsTask,standAloneMuons,hiSignalGlobalMuons)
muontracking = cms.Sequence(muontrackingTask)

Expand Down
35 changes: 18 additions & 17 deletions RecoHI/Configuration/python/peripheralHLTFilter_cff.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import FWCore.ParameterSet.Config as cms

import HLTrigger.HLTfilters.hltHighLevel_cfi
hltPerhiphHI = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone()
hltPerhiphHI.HLTPaths = ["HLT_HISinglePhoton*_Eta*_Cent50_100_*",
"HLT_HISinglePhoton*_Eta*_Cent30_100_*",
"HLT_HIFullTrack*_L1Centrality30100_*",
"HLT_HIPuAK4CaloJet*_Eta5p1_Cent50_100_v*",
"HLT_HIPuAK4CaloJet*_Eta5p1_Cent30_100_v*",
"HLT_HIDmesonHITrackingGlobal_Dpt*_Cent50_100_v*",
"HLT_HIDmesonHITrackingGlobal_Dpt*_Cent30_100_v*",
"HLT_HIL1Centralityext30100MinimumumBiasHF*",
"HLT_HIL1Centralityext50100MinimumumBiasHF*",
"HLT_HIQ2*005_Centrality3050_v*",
"HLT_HIQ2*005_Centrality5070_v*",
"HLT_HICastor*",
"HLT_HIL1Castor*",
"HLT_HIUPC*"]
hltPerhiphHI.throw = False
hltPerhiphHI.andOr = True
hltPerhiphHI = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone(
HLTPaths = ["HLT_HISinglePhoton*_Eta*_Cent50_100_*",
"HLT_HISinglePhoton*_Eta*_Cent30_100_*",
"HLT_HIFullTrack*_L1Centrality30100_*",
"HLT_HIPuAK4CaloJet*_Eta5p1_Cent50_100_v*",
"HLT_HIPuAK4CaloJet*_Eta5p1_Cent30_100_v*",
"HLT_HIDmesonHITrackingGlobal_Dpt*_Cent50_100_v*",
"HLT_HIDmesonHITrackingGlobal_Dpt*_Cent30_100_v*",
"HLT_HIL1Centralityext30100MinimumumBiasHF*",
"HLT_HIL1Centralityext50100MinimumumBiasHF*",
"HLT_HIQ2*005_Centrality3050_v*",
"HLT_HIQ2*005_Centrality5070_v*",
"HLT_HICastor*",
"HLT_HIL1Castor*",
"HLT_HIUPC*"],
throw = False,
andOr = True
)

peripheralHLTFilterSequence = cms.Sequence( hltPerhiphHI )
26 changes: 13 additions & 13 deletions RecoHI/HiTracking/python/HIBestVertexSequences_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# sort by number of tracks and keep the best
hiBestAdaptiveVertex = cms.EDFilter("HIBestVertexSelection",
src = cms.InputTag("hiPixelAdaptiveVertex"),
maxNumber = cms.uint32(1)
maxNumber = cms.uint32(1)
)

# select best of precise vertex, fast vertex, and beamspot
Expand All @@ -19,18 +19,18 @@

from RecoHI.HiTracking.HIPixelAdaptiveVertex_cfi import *
hiOfflinePrimaryVertices=hiPixelAdaptiveVertex.clone( # vertexing run AFTER tracking
TrackLabel = cms.InputTag("hiGeneralTracks"),
TrackLabel = "hiGeneralTracks",

TkFilterParameters = cms.PSet(
algorithm = cms.string('filterWithThreshold'),
maxNormalizedChi2 = cms.double(5.0),
minPixelLayersWithHits=cms.int32(3), #0 missing pix hit (Run 1 pixels)
minSiliconLayersWithHits = cms.int32(5),#at least 8 (3pix+5strip) hits total
maxD0Significance = cms.double(3.0), #default is 5.0 in pp; 3.0 here suppresses split vtxs
minPt = cms.double(0.0),
maxEta = cms.double(100.),
trackQuality = cms.string("any"),
numTracksThreshold = cms.int32(2)
TkFilterParameters = dict(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is perhaps correct, but for safety (not all parameters are re-defined here) I'd revert it to a PSet, as before

algorithm = 'filterWithThreshold',
maxNormalizedChi2 = 5.0,
minPixelLayersWithHits = 3, #0 missing pix hit (Run 1 pixels)
minSiliconLayersWithHits = 5, #at least 8 (3pix+5strip) hits total
maxD0Significance = 3.0, #default is 5.0 in pp; 3.0 here suppresses split vtxs
minPt = 0.0,
maxEta = 100.,
trackQuality = "any",
numTracksThreshold = 2
)
)
from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
Expand All @@ -45,7 +45,7 @@
)
# select best of precise vertex, fast vertex, and beamspot
hiSelectedVertex = hiSelectedPixelVertex.clone(
useFinalAdaptiveVertexCollection = cms.bool(True),
useFinalAdaptiveVertexCollection = True,
finalAdaptiveVertexCollection = cms.InputTag("hiBestOfflinePrimaryVertex")
)
bestFinalHiVertexTask = cms.Task(hiOfflinePrimaryVertices , hiBestOfflinePrimaryVertex , hiSelectedVertex )
18 changes: 11 additions & 7 deletions RecoHI/HiTracking/python/HIInitialJetCoreClusterSplitting_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,26 @@
hiCaloTowerForTrkPreSplitting = hiCaloTowerForTrk.clone()
hiAkPu4CaloJetsForTrkPreSplitting = akPu4CaloJetsForTrk.clone(
src = 'hiCaloTowerForTrkPreSplitting',
srcPVs = 'hiSelectedVertexPreSplitting')
srcPVs = 'hiSelectedVertexPreSplitting'
)
hiAkPu4CaloJetsCorrectedPreSplitting = akPu4CaloJetsCorrected.clone(
src = 'hiAkPu4CaloJetsForTrkPreSplitting')
src = 'hiAkPu4CaloJetsForTrkPreSplitting'
)
hiAkPu4CaloJetsSelectedPreSplitting = akPu4CaloJetsSelected.clone(
src = 'hiAkPu4CaloJetsCorrectedPreSplitting')
src = 'hiAkPu4CaloJetsCorrectedPreSplitting'
)
hiJetsForCoreTrackingPreSplitting = hiJetsForCoreTracking.clone(
src = 'hiAkPu4CaloJetsSelectedPreSplitting')
src = 'hiAkPu4CaloJetsSelectedPreSplitting'
)


from RecoLocalTracker.SubCollectionProducers.jetCoreClusterSplitter_cfi import jetCoreClusterSplitter
siPixelClusters = jetCoreClusterSplitter.clone(
pixelClusters = cms.InputTag('siPixelClustersPreSplitting'),
pixelClusters = 'siPixelClustersPreSplitting',
vertices = 'hiSelectedVertexPreSplitting',
cores = 'hiJetsForCoreTrackingPreSplitting',
deltaRmax = cms.double(0.1),
ptMin = cms.double(50)
deltaRmax = 0.1,
ptMin = 50
)

from RecoLocalTracker.SiPixelRecHits.SiPixelRecHits_cfi import siPixelRecHits
Expand Down
107 changes: 55 additions & 52 deletions RecoHI/HiTracking/python/HILowPtConformalPixelTracks_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@

# Hit ntuplets
hiConformalPixelTracksHitDoublets = _hitPairEDProducer.clone(
clusterCheck = "",
seedingLayers = "PixelLayerTriplets",
clusterCheck = "",
seedingLayers = "PixelLayerTriplets",
trackingRegions = "hiTrackingRegionWithVertex",
maxElement = 50000000,
maxElement = 50000000,
produceIntermediateHitDoublets = True,
)

hiConformalPixelTracksHitTriplets = _pixelTripletHLTEDProducer.clone(
doublets = "hiConformalPixelTracksHitDoublets",
doublets = "hiConformalPixelTracksHitDoublets",
maxElement = 5000000, # increase threshold for triplets in generation step (default: 100000)
produceSeedingHitSets = True,
)
Expand Down Expand Up @@ -49,78 +49,81 @@

#Tracking regions - use PV from pp tracking
from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cfi import globalTrackingRegionWithVertices
hiConformalPixelTracksPhase1TrackingRegions = globalTrackingRegionWithVertices.clone(RegionPSet=dict(
precise = True,
useMultipleScattering = False,
useFakeVertices = False,
beamSpot = "offlineBeamSpot",
useFixedError = True,
nSigmaZ = 3.0,
sigmaZVertex = 3.0,
fixedError = 0.2,
VertexCollection = "offlinePrimaryVertices",
ptMin = 0.3,
useFoundVertices = True,
originRadius = 0.2
))
hiConformalPixelTracksPhase1TrackingRegions = globalTrackingRegionWithVertices.clone(
RegionPSet = dict(
precise = True,
useMultipleScattering = False,
useFakeVertices = False,
beamSpot = "offlineBeamSpot",
useFixedError = True,
nSigmaZ = 3.0,
sigmaZVertex = 3.0,
fixedError = 0.2,
VertexCollection = "offlinePrimaryVertices",
ptMin = 0.3,
useFoundVertices = True,
originRadius = 0.2
)
)

# SEEDING LAYERS
# Using 4 layers layerlist
from RecoTracker.IterativeTracking.LowPtQuadStep_cff import lowPtQuadStepSeedLayers
hiConformalPixelTracksPhase1SeedLayers = lowPtQuadStepSeedLayers.clone()
hiConformalPixelTracksPhase1SeedLayers.BPix = cms.PSet(
HitProducer = cms.string('siPixelRecHits'),
TTRHBuilder = cms.string('WithTrackAngle'),
)
hiConformalPixelTracksPhase1SeedLayers.FPix = cms.PSet(
HitProducer = cms.string('siPixelRecHits'),
TTRHBuilder = cms.string('WithTrackAngle'),
hiConformalPixelTracksPhase1SeedLayers = lowPtQuadStepSeedLayers.clone(
BPix = dict(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should get reverted to PSet

HitProducer = 'siPixelRecHits',
TTRHBuilder = 'WithTrackAngle',
),
FPix = dict(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should get reverted to PSet

HitProducer = 'siPixelRecHits',
TTRHBuilder = 'WithTrackAngle',
)
)


# Hit ntuplets
from RecoTracker.IterativeTracking.LowPtQuadStep_cff import lowPtQuadStepHitDoublets
hiConformalPixelTracksPhase1HitDoubletsCA = lowPtQuadStepHitDoublets.clone(
seedingLayers = "hiConformalPixelTracksPhase1SeedLayers",
trackingRegions = "hiConformalPixelTracksPhase1TrackingRegions"
seedingLayers = "hiConformalPixelTracksPhase1SeedLayers",
trackingRegions = "hiConformalPixelTracksPhase1TrackingRegions"
)


from RecoTracker.IterativeTracking.LowPtQuadStep_cff import lowPtQuadStepHitQuadruplets
hiConformalPixelTracksPhase1HitQuadrupletsCA = lowPtQuadStepHitQuadruplets.clone(
doublets = "hiConformalPixelTracksPhase1HitDoubletsCA",
CAPhiCut = 0.2,
CAThetaCut = 0.0012,
SeedComparitorPSet = cms.PSet(
ComponentName = cms.string('none')
),
extraHitRPhitolerance = 0.032,
maxChi2 = cms.PSet(
enabled = cms.bool(True),
pt1 = cms.double(0.7),
pt2 = cms.double(2),
value1 = cms.double(200),
value2 = cms.double(50)
)
doublets = "hiConformalPixelTracksPhase1HitDoubletsCA",
CAPhiCut = 0.2,
CAThetaCut = 0.0012,
SeedComparitorPSet = dict(
ComponentName = 'none'
),
extraHitRPhitolerance = 0.032,
maxChi2 = dict(
enabled = True,
pt1 = 0.7,
pt2 = 2,
value1 = 200,
value2 = 50
)
)

#Filter
hiConformalPixelTracksPhase1Filter = hiConformalPixelFilter.clone(
VertexCollection = "offlinePrimaryVertices",
chi2 = 999.9,
lipMax = 999.0,
nSigmaLipMaxTolerance = 999.9,
nSigmaTipMaxTolerance = 999.0,
ptMax = 999999,
ptMin = 0.30,
tipMax = 999.0
VertexCollection = "offlinePrimaryVertices",
chi2 = 999.9,
lipMax = 999.0,
nSigmaLipMaxTolerance = 999.9,
nSigmaTipMaxTolerance = 999.0,
ptMax = 999999,
ptMin = 0.30,
tipMax = 999.0
)

from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
phase1Pixel.toModify(hiConformalPixelTracks,
Cleaner = 'pixelTrackCleanerBySharedHits',
Filter = "hiConformalPixelTracksPhase1Filter",
Fitter = "pixelFitterByConformalMappingAndLine",
Filter = "hiConformalPixelTracksPhase1Filter",
Fitter = "pixelFitterByConformalMappingAndLine",
SeedingHitSets = "hiConformalPixelTracksPhase1HitQuadrupletsCA",
)

Expand Down
Loading