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

Introduce High Granularity Tracker Alignment Prompt Calibration Loop for HLT alignment conditions #46888

Merged
merged 4 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import FWCore.ParameterSet.Config as cms

OutALCARECOPromptCalibProdSiPixelAliHLTHGC_noDrop = cms.PSet(
SelectEvents = cms.untracked.PSet(
SelectEvents = cms.vstring('pathALCARECOPromptCalibProdSiPixelAliHLTHGMinBias','pathALCARECOPromptCalibProdSiPixelAliHLTHGDiMu')
),
outputCommands = cms.untracked.vstring('keep *_SiPixelAliMillePedeFileConverterHLTHGDimuon_*_*',
'keep *_SiPixelAliMillePedeFileConverterHLTHG_*_*')
)

OutALCARECOPromptCalibProdSiPixelAliHLTHGC=OutALCARECOPromptCalibProdSiPixelAliHLTHGC_noDrop.clone()
OutALCARECOPromptCalibProdSiPixelAliHLTHGC.outputCommands.insert(0, "drop *")
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
import FWCore.ParameterSet.Config as cms

# ------------------------------------------------------------------------------
# configure a filter to run only on the events selected by TkAlZMuMu AlcaReco
from HLTrigger.HLTfilters.hltHighLevel_cfi import *
ALCARECOTkAlZMuMuFilterForSiPixelAliHLT = hltHighLevel.clone(
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't you think to clone them from triggerResultsFilterFromDB, as modified for other AlCa filters in #46742? I understand that you probably don't plan to prescale further these paths, but I wonder if the same configurations could be used for all them. Unless there is a real advantage in cloning from hltHighLevel

Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment applies to the other similar instances in this PR

Copy link
Contributor

@mmusich mmusich Dec 6, 2024

Choose a reason for hiding this comment

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

In this specific instance you have commented upon it's not possible to use triggerResultsFilterFromDB because the filtering is not based on a path key retrieved from the event setup but rather on the name of the path pathALCARECOTkAlHLTTracksZMuMu which is executed in the step before (the alcareco sample creation: this ensures that the producer is run only in presence of the right input set of tracks).
Elsewhere it might be possible to use it, but there is no advantage in doing so. The input HLT paths are actually already limited in rate (see CMSHLT-3404), thus prescaling is not desireable - we'll actually be statistically limited.

HLTPaths = ['pathALCARECOTkAlHLTTracksZMuMu'],
throw = True, ## dont throw on unknown path names,
TriggerResultsTag = "TriggerResults::RECO"
)

from Alignment.CommonAlignmentProducer.ALCARECOPromptCalibProdSiPixelAliHLT_cff import *
from Alignment.CommonAlignmentProducer.LSNumberFilter_cfi import *



# Ingredient: AlignmentTrackSelector
# track selector for HighPurity tracks
#-- AlignmentTrackSelector
SiPixelAliLooseSelectorHLTHGDimuon = SiPixelAliLooseSelectorHLT.clone(
src = 'ALCARECOTkAlHLTTracksZMuMu',
etaMax = 3.0,
etaMin = -3.0,
filter = True,
pMin = 8.0,
)

# track selection for alignment
SiPixelAliTrackSelectorHLTHGDimuon = SiPixelAliTrackSelectorHLT.clone(
src = 'SiPixelAliTrackFitterHLTHGDimuon',
applyMultiplicityFilter = True,
d0Max = 50.0,
d0Min = -50.0,
etaMax = 3.0,
etaMin = -3.0,
filter = True,
maxMultiplicity = 2,
minHitChargeStrip = 20.0,
minHitIsolation = 0.01,
minMultiplicity = 2,
nHighestPt = 2,
nHitMin = 10,
pMin = 3.0,
ptMin = 15.0,
TwoBodyDecaySelector = dict(applyChargeFilter = True,
applyMassrangeFilter = True,
maxXMass = 95.8,
minXMass = 85.8),
minHitsPerSubDet = dict(inPIXEL = 1)
)

# Ingredient: SiPixelAliTrackRefitter0
# refitting
SiPixelAliTrackRefitterHLTHGDimuon0 = SiPixelAliTrackRefitterHLT0.clone(
src = 'SiPixelAliLooseSelectorHLTHGDimuon'
)
SiPixelAliTrackRefitterHLTHGDimuon1 = SiPixelAliTrackRefitterHLTHGDimuon0.clone(
src = 'SiPixelAliTrackSelectorHLTHGDimuon'
)

#-- Alignment producer
SiPixelAliMilleAlignmentProducerHLTHGDimuon = SiPixelAliMilleAlignmentProducerHLT.clone(
ParameterBuilder = dict(
Selector = cms.PSet(
alignParams = cms.vstring(
"TrackerP1PXBLadder,111111",
"TrackerP1PXECPanel,111111",
)
)
),
tjTkAssociationMapTag = 'SiPixelAliTrackRefitterHLTHGDimuon1',
algoConfig = MillePedeAlignmentAlgorithm.clone(
binaryFile = 'milleBinaryHLTHGDimuon_0.dat',
treeFile = 'treeFileHLTHGDimuon.root',
monitorFile = 'millePedeMonitorHLTHGDimuon.root',
minNumHits = 8,
skipGlobalPositionRcdCheck = True,
TrajectoryFactory = cms.PSet(
AllowZeroMaterial = cms.bool(False),
Chi2Cut = cms.double(10000.0),
ConstructTsosWithErrors = cms.bool(False),
EstimatorParameters = cms.PSet(
MaxIterationDifference = cms.untracked.double(0.01),
MaxIterations = cms.untracked.int32(100),
RobustificationConstant = cms.untracked.double(1.0),
UseInvariantMass = cms.untracked.bool(True)
),
IncludeAPEs = cms.bool(False),
MaterialEffects = cms.string('LocalGBL'),
NSigmaCut = cms.double(100.0),
ParticleProperties = cms.PSet(
PrimaryMass = cms.double(91.1061),
PrimaryWidth = cms.double(1.7678),
SecondaryMass = cms.double(0.105658)
),
PropagationDirection = cms.string('alongMomentum'),
TrajectoryFactoryName = cms.string('TwoBodyDecayTrajectoryFactory'),
UseBeamSpot = cms.bool(False),
UseHitWithoutDet = cms.bool(True),
UseInvalidHits = cms.bool(True),
UseProjectedHits = cms.bool(True),
UseRefittedState = cms.bool(True)
)
)
)

# Ingredient: SiPixelAliTrackerTrackHitFilter
SiPixelAliTrackerTrackHitFilterHLTHGDimuon = SiPixelAliTrackerTrackHitFilterHLT.clone(
src = 'SiPixelAliTrackRefitterHLTHGDimuon0',
TrackAngleCut = 0.087,
minimumHits = 10,
usePixelQualityFlag = False
)

# Ingredient: SiPixelAliSiPixelAliTrackFitter
SiPixelAliTrackFitterHLTHGDimuon = SiPixelAliTrackFitterHLT.clone(
src = 'SiPixelAliTrackerTrackHitFilterHLTHGDimuon'
)

SiPixelAliMillePedeFileConverterHLTHGDimuon = cms.EDProducer(
"MillePedeFileConverter",
fileDir = cms.string(SiPixelAliMilleAlignmentProducerHLTHGDimuon.algoConfig.fileDir.value()),
inputBinaryFile = cms.string(SiPixelAliMilleAlignmentProducerHLTHGDimuon.algoConfig.binaryFile.value()),
fileBlobLabel = cms.string('')
)

seqALCARECOPromptCalibProdSiPixelAliHLTHGDiMu = cms.Sequence(
ALCARECOTkAlZMuMuFilterForSiPixelAliHLT*
LSNumberFilter*
onlineBeamSpot*
SiPixelAliLooseSelectorHLTHGDimuon*
SiPixelAliTrackRefitterHLTHGDimuon0*
SiPixelAliTrackerTrackHitFilterHLTHGDimuon*
SiPixelAliTrackFitterHLTHGDimuon*
SiPixelAliTrackSelectorHLTHGDimuon*
SiPixelAliTrackRefitterHLTHGDimuon1*
SiPixelAliMilleAlignmentProducerHLTHGDimuon*
SiPixelAliMillePedeFileConverterHLTHGDimuon
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import FWCore.ParameterSet.Config as cms

# ------------------------------------------------------------------------------
# configure a filter to run only on the events selected by TkAlMinBias AlcaReco
from HLTrigger.HLTfilters.hltHighLevel_cfi import *
ALCARECOTkAlMinBiasFilterForSiPixelAliHLTHG = hltHighLevel.clone(
HLTPaths = ['pathALCARECOTkAlHLTTracks'],
throw = True, ## dont throw on unknown path names,
TriggerResultsTag = "TriggerResults::RECO"
)

from Alignment.CommonAlignmentProducer.ALCARECOPromptCalibProdSiPixelAliHLT_cff import *
from Alignment.CommonAlignmentProducer.LSNumberFilter_cfi import *

# Ingredient: AlignmentTrackSelector
# track selector for HighPurity tracks
#-- AlignmentTrackSelector
SiPixelAliLooseSelectorHLTHG = SiPixelAliLooseSelectorHLT.clone(
src = 'ALCARECOTkAlHLTTracks',
)

# track selection for alignment
SiPixelAliTrackSelectorHLTHG = SiPixelAliTrackSelectorHLT.clone(
src = 'SiPixelAliTrackFitterHLTHG'
)

# Ingredient: SiPixelAliTrackRefitter0
# refitting
SiPixelAliTrackRefitterHLTHG0 = SiPixelAliTrackRefitterHLT0.clone(
src = 'SiPixelAliLooseSelectorHLTHG'
)
SiPixelAliTrackRefitterHLTHG1 = SiPixelAliTrackRefitterHLTHG0.clone(
src = 'SiPixelAliTrackSelectorHLTHG'
)

#-- Alignment producer
SiPixelAliMilleAlignmentProducerHLTHG = SiPixelAliMilleAlignmentProducerHLT.clone(
ParameterBuilder = dict(
Selector = cms.PSet(
alignParams = cms.vstring(
"TrackerP1PXBLadder,111111",
"TrackerP1PXECPanel,111111",
)
)
),
tjTkAssociationMapTag = 'SiPixelAliTrackRefitterHLTHG1',
algoConfig = MillePedeAlignmentAlgorithm.clone(
binaryFile = 'milleBinaryHLTHG_0.dat',
treeFile = 'treeFileHLTHG.root',
monitorFile = 'millePedeMonitorHLTHG.root'
)
)

# Ingredient: SiPixelAliTrackerTrackHitFilter
SiPixelAliTrackerTrackHitFilterHLTHG = SiPixelAliTrackerTrackHitFilterHLT.clone(
src = 'SiPixelAliTrackRefitterHLTHG0',
usePixelQualityFlag = False
)

# Ingredient: SiPixelAliSiPixelAliTrackFitter
SiPixelAliTrackFitterHLTHG = SiPixelAliTrackFitterHLT.clone(
src = 'SiPixelAliTrackerTrackHitFilterHLTHG'
)

SiPixelAliMillePedeFileConverterHLTHG = cms.EDProducer(
"MillePedeFileConverter",
fileDir = cms.string(SiPixelAliMilleAlignmentProducerHLTHG.algoConfig.fileDir.value()),
inputBinaryFile = cms.string(SiPixelAliMilleAlignmentProducerHLTHG.algoConfig.binaryFile.value()),
fileBlobLabel = cms.string('')
)

seqALCARECOPromptCalibProdSiPixelAliHLTHG = cms.Sequence(
ALCARECOTkAlMinBiasFilterForSiPixelAliHLTHG*
LSNumberFilter*
onlineBeamSpot*
SiPixelAliLooseSelectorHLTHG*
SiPixelAliTrackRefitterHLTHG0*
SiPixelAliTrackerTrackHitFilterHLTHG*
SiPixelAliTrackFitterHLTHG*
SiPixelAliTrackSelectorHLTHG*
SiPixelAliTrackRefitterHLTHG1*
SiPixelAliMilleAlignmentProducerHLTHG*
SiPixelAliMillePedeFileConverterHLTHG
)
Loading