Skip to content

Commit

Permalink
add trimming modules for the phase2 hlt menus
Browse files Browse the repository at this point in the history
  • Loading branch information
lguzzi committed Jan 16, 2025
1 parent d7b551b commit 5511128
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import FWCore.ParameterSet.Config as cms

# This modifier is used to enable vertex trimming in the tracking sequences
# and in all related reconstruction modules
phase2_hlt_vertexTrimming = cms.Modifier()
Original file line number Diff line number Diff line change
Expand Up @@ -1684,6 +1684,22 @@ def condition(self, fragment, stepList, key, hasHarvest):
'--procModifiers': 'alpaka,trackingLST'
}

upgradeWFs['HLTTiming75e33TrimmedTracking'] = deepcopy(upgradeWFs['HLTTiming75e33'])
upgradeWFs['HLTTiming75e33TrimmedTracking'].suffix = '_HLT75e33TimingTrimmedTracking'
upgradeWFs['HLTTiming75e33TrimmedTracking'].offset = 0.756
upgradeWFs['HLTTiming75e33TrimmedTracking'].step2 = {
'-s':'DIGI:pdigi_valid,L1TrackTrigger,L1,L1P2GT,DIGI2RAW,HLT:75e33_timing',
'--procModifiers': 'phase2_hlt_vertexTrimming'
}

upgradeWFs['HLTTiming75e33AlpakaTrimmedTracking'] = deepcopy(upgradeWFs['HLTTiming75e33'])
upgradeWFs['HLTTiming75e33AlpakaTrimmedTracking'].suffix = '_HLT75e33TimingAlpakaTrimmedTracking'
upgradeWFs['HLTTiming75e33AlpakaTrimmedTracking'].offset = 0.757
upgradeWFs['HLTTiming75e33AlpakaTrimmedTracking'].step2 = {
'-s':'DIGI:pdigi_valid,L1TrackTrigger,L1,L1P2GT,DIGI2RAW,HLT:75e33_timing',
'--procModifiers': 'alpaka,phase2_hlt_vertexTrimming'
}


class UpgradeWorkflow_HLTwDIGI75e33(UpgradeWorkflow):
def setup_(self, step, stepName, stepDict, k, properties):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@
trackingRegions = cms.InputTag("hltPhase2PixelTracksAndHighPtStepTrackingRegions"),
trackingRegionsSeedingLayers = cms.InputTag("")
)

from Configuration.ProcessModifiers.phase2_hlt_vertexTrimming_cff import phase2_hlt_vertexTrimming
phase2_hlt_vertexTrimming.toModify(hltHighPtTripletStepHitDoublets, trackingRegions = cms.InputTag('hltTrackingRegionFromTrimmedVertices'))
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import FWCore.ParameterSet.Config as cms

hltTrackingRegionFromTrimmedVertices = cms.EDProducer('GlobalTrackingRegionWithVerticesEDProducer',
RegionPSet = cms.PSet(
ptMin = cms.double(0.9),
beamSpot = cms.InputTag('hltOnlineBeamSpot'),
VertexCollection = cms.InputTag('hltPhase2TrimmedPixelVertices'),
originRadius = cms.double(0.02),
precise = cms.bool(True),
useMultipleScattering = cms.bool(False),
useFixedError = cms.bool(True),
sigmaZVertex = cms.double(3.0),
fixedError = cms.double(0.2),
useFoundVertices = cms.bool(True),
useFakeVertices = cms.bool(False),
maxNVertices = cms.int32(-1),
nSigmaZ = cms.double(4.0),
pixelClustersForScaling = cms.InputTag('hltSiPixelClusters'),
originRScaling4BigEvts = cms.bool(False),
ptMinScaling4BigEvts = cms.bool(False),
halfLengthScaling4BigEvts = cms.bool(False),
allowEmpty = cms.bool(False),
minOriginR = cms.double(0),
maxPtMin = cms.double(1000),
minHalfLength = cms.double(0),
scalingStartNPix = cms.double(0.0),
scalingEndNPix = cms.double(1.0),
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@

from Configuration.ProcessModifiers.trackingLST_cff import trackingLST
trackingLST.toModify(hltInitialStepSeeds, includeFourthHit = True)

from Configuration.ProcessModifiers.phase2_hlt_vertexTrimming_cff import phase2_hlt_vertexTrimming
phase2_hlt_vertexTrimming.toModify(hltInitialStepSeeds, InputVertexCollection = cms.InputTag("hltPhase2TrimmedPixelVertices"))
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import FWCore.ParameterSet.Config as cms

hltPhase2TrimmedPixelVertices = cms.EDProducer("PixelVertexCollectionTrimmer",
src = cms.InputTag("hltPhase2PixelVertices"),
maxVtx = cms.uint32(300),
fractionSumPt2 = cms.double(0.3),
minSumPt2 = cms.double(0.0),
PVcomparer = cms.PSet(
refToPSet_ = cms.string("pSetPvClusterComparerForIT"),
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from ..modules.hltHighPtTripletStepTrackCutClassifier_cfi import *
from ..modules.hltHighPtTripletStepTracks_cfi import *
from ..modules.hltHighPtTripletStepTrackSelectionHighPurity_cfi import *
from ..modules.hltHighPtTripletStepTrackingRegionFromTrimmedVertices_cfi import *
from ..sequences.HLTHighPtTripletStepSeedingSequence_cfi import *

HLTHighPtTripletStepSequence = cms.Sequence(
Expand All @@ -30,3 +31,8 @@

from Configuration.ProcessModifiers.seedingLST_cff import seedingLST
(seedingLST & trackingLST).toReplaceWith(HLTHighPtTripletStepSequence, _HLTHighPtTripletStepSequenceLSTSeeding)

from Configuration.ProcessModifiers.phase2_hlt_vertexTrimming_cff import phase2_hlt_vertexTrimming
_HLTHighPtTripletStepSequenceTrimming = HLTHighPtTripletStepSequence.copy()
_HLTHighPtTripletStepSequenceTrimming.insert(0, hltTrackingRegionFromTrimmedVertices)
phase2_hlt_vertexTrimming.toReplaceWith(HLTHighPtTripletStepSequence, _HLTHighPtTripletStepSequenceTrimming)
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from ..modules.hltGeneralTracks_cfi import *
from ..modules.hltPhase2PixelVertices_cfi import *
from ..modules.hltPhase2TrimmedPixelVertices_cfi import *
from ..modules.hltTrackerClusterCheck_cfi import *
from ..sequences.HLTHighPtTripletStepSequence_cfi import *
from ..sequences.HLTPhase2PixelTracksSequence_cfi import *
Expand All @@ -13,3 +14,8 @@

from Configuration.ProcessModifiers.singleIterPatatrack_cff import singleIterPatatrack
singleIterPatatrack.toReplaceWith(HLTTrackingV61Sequence, HLTTrackingV61Sequence.copyAndExclude([HLTHighPtTripletStepSequence]))

from Configuration.ProcessModifiers.phase2_hlt_vertexTrimming_cff import phase2_hlt_vertexTrimming
_HLTTrackingV61SequenceTrimming = HLTTrackingV61Sequence.copy()
_HLTTrackingV61SequenceTrimming.insert(_HLTTrackingV61SequenceTrimming.index(hltPhase2PixelVertices)+1, hltPhase2TrimmedPixelVertices)
phase2_hlt_vertexTrimming.toReplaceWith(HLTTrackingV61Sequence, _HLTTrackingV61SequenceTrimming)

0 comments on commit 5511128

Please sign in to comment.