-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New high granularity pixel alignment for the PCL #38449
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
Changes from all commits
5355c8d
830554d
37df8ec
7d9d9c2
6494790
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import FWCore.ParameterSet.Config as cms | ||
|
|
||
| OutALCARECOPromptCalibProdSiPixelAliHG_noDrop = cms.PSet( | ||
| SelectEvents = cms.untracked.PSet( | ||
| SelectEvents = cms.vstring('pathALCARECOPromptCalibProdSiPixelAliHG') | ||
| ), | ||
| outputCommands = cms.untracked.vstring( | ||
| 'keep *_SiPixelAliMillePedeFileConverterHG_*_*') | ||
| ) | ||
|
|
||
| OutALCARECOPromptCalibProdSiPixelAliHG=OutALCARECOPromptCalibProdSiPixelAliHG_noDrop.clone() | ||
| OutALCARECOPromptCalibProdSiPixelAliHG.outputCommands.insert(0, "drop *") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| import FWCore.ParameterSet.Config as cms | ||
|
|
||
| # ------------------------------------------------------------------------------ | ||
| # configure a filter to run only on the events selected by TkAlMinBias AlcaReco | ||
| from Alignment.CommonAlignmentProducer.ALCARECOPromptCalibProdSiPixelAli_cff import * | ||
| ALCARECOTkAlMinBiasFilterForSiPixelAliHG = ALCARECOTkAlMinBiasFilterForSiPixelAli.clone() | ||
|
|
||
|
|
||
| from Alignment.CommonAlignmentProducer.LSNumberFilter_cfi import * | ||
|
|
||
| # Ingredient: offlineBeamSpot | ||
| from RecoVertex.BeamSpotProducer.BeamSpot_cfi import offlineBeamSpot | ||
|
|
||
| # Ingredient: AlignmentTrackSelector | ||
| # track selector for HighPurity tracks | ||
| #-- AlignmentTrackSelector | ||
| SiPixelAliHighPuritySelectorHG = SiPixelAliHighPuritySelector.clone() | ||
|
|
||
| # track selection for alignment | ||
| SiPixelAliTrackSelectorHG = SiPixelAliTrackSelector.clone( | ||
| src = 'SiPixelAliTrackFitterHG' | ||
| ) | ||
|
|
||
| # Ingredient: SiPixelAliTrackRefitter0 | ||
| # refitting | ||
| SiPixelAliTrackRefitterHG0 = SiPixelAliTrackRefitter0.clone( | ||
| src = 'SiPixelAliHighPuritySelectorHG' | ||
| ) | ||
| SiPixelAliTrackRefitterHG1 = SiPixelAliTrackRefitterHG0.clone( | ||
| src = 'SiPixelAliTrackSelectorHG' | ||
| ) | ||
|
|
||
| #-- Alignment producer | ||
| SiPixelAliMilleAlignmentProducerHG = SiPixelAliMilleAlignmentProducer.clone( | ||
| ParameterBuilder = dict( | ||
| Selector = cms.PSet( | ||
| alignParams = cms.vstring( | ||
| "TrackerP1PXBLadder,111111", | ||
| "TrackerP1PXECPanel,111111", | ||
| ) | ||
| ) | ||
| ), | ||
| tjTkAssociationMapTag = 'SiPixelAliTrackRefitterHG1', | ||
| algoConfig = MillePedeAlignmentAlgorithm.clone( | ||
| binaryFile = 'milleBinaryHG_0.dat', | ||
| treeFile = 'treeFileHG.root', | ||
| monitorFile = 'millePedeMonitorHG.root' | ||
| ) | ||
| ) | ||
|
|
||
| # Ingredient: SiPixelAliTrackerTrackHitFilter | ||
| SiPixelAliTrackerTrackHitFilterHG = SiPixelAliTrackerTrackHitFilter.clone( | ||
| src = 'SiPixelAliTrackRefitterHG0' | ||
| ) | ||
|
|
||
| # Ingredient: SiPixelAliSiPixelAliTrackFitter | ||
| SiPixelAliTrackFitterHG = SiPixelAliTrackFitter.clone( | ||
| src = 'SiPixelAliTrackerTrackHitFilterHG' | ||
| ) | ||
|
|
||
| SiPixelAliMillePedeFileConverterHG = cms.EDProducer("MillePedeFileConverter", | ||
| fileDir = cms.string(SiPixelAliMilleAlignmentProducerHG.algoConfig.fileDir.value()), | ||
| inputBinaryFile = cms.string(SiPixelAliMilleAlignmentProducerHG.algoConfig.binaryFile.value()), | ||
| fileBlobLabel = cms.string(''), | ||
| ) | ||
|
|
||
|
|
||
|
|
||
| seqALCARECOPromptCalibProdSiPixelAliHG = cms.Sequence(ALCARECOTkAlMinBiasFilterForSiPixelAliHG* | ||
| lsNumberFilter* | ||
| offlineBeamSpot* | ||
| SiPixelAliHighPuritySelectorHG* | ||
| SiPixelAliTrackRefitterHG0* | ||
| SiPixelAliTrackerTrackHitFilterHG* | ||
| SiPixelAliTrackFitterHG* | ||
| SiPixelAliTrackSelectorHG* | ||
| SiPixelAliTrackRefitterHG1* | ||
| SiPixelAliMilleAlignmentProducerHG* | ||
| SiPixelAliMillePedeFileConverterHG) |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,80 @@ | ||||||
| import FWCore.ParameterSet.Config as cms | ||||||
|
|
||||||
| SiPixelAliMilleFileExtractorHG = cms.EDAnalyzer("MillePedeFileExtractor", | ||||||
| fileBlobInputTag = cms.InputTag("SiPixelAliMillePedeFileConverterHG",''), | ||||||
| fileDir = cms.string('HGalignment/'), | ||||||
| # File names the Extractor will use to write the fileblobs in the root | ||||||
| # file as real binary files to disk, so that the pede step can read them. | ||||||
| # This includes the formatting directive "%04d" which will be expanded to | ||||||
| # 0000, 0001, 0002,... | ||||||
| outputBinaryFile = cms.string('pedeBinaryHG%04d.dat')) | ||||||
|
|
||||||
| from Alignment.MillePedeAlignmentAlgorithm.MillePedeAlignmentAlgorithm_cfi import * | ||||||
| from Alignment.CommonAlignmentProducer.AlignmentProducerAsAnalyzer_cff import AlignmentProducer | ||||||
| from Alignment.MillePedeAlignmentAlgorithm.MillePedeDQMModule_cff import * | ||||||
|
|
||||||
| SiPixelAliPedeAlignmentProducerHG = AlignmentProducer.clone( | ||||||
| ParameterBuilder = dict( | ||||||
| Selector = cms.PSet( | ||||||
| alignParams = cms.vstring( | ||||||
| "TrackerP1PXBLadder,111111", | ||||||
| "TrackerP1PXECPanel,111111", | ||||||
| ) | ||||||
| ) | ||||||
| ), | ||||||
| doMisalignmentScenario = False, | ||||||
| checkDbAlignmentValidity = False, | ||||||
| applyDbAlignment = True, | ||||||
| tjTkAssociationMapTag = 'TrackRefitter2', | ||||||
| saveToDB = True, | ||||||
| trackerAlignmentRcdName = "TrackerAlignmentHGRcd" | ||||||
| ) | ||||||
|
|
||||||
| SiPixelAliPedeAlignmentProducerHG.algoConfig = MillePedeAlignmentAlgorithm.clone( | ||||||
| mode = 'pede', | ||||||
| runAtPCL = True, | ||||||
| mergeBinaryFiles = [SiPixelAliMilleFileExtractorHG.outputBinaryFile.value()], | ||||||
| binaryFile = '', | ||||||
| TrajectoryFactory = cms.PSet(BrokenLinesTrajectoryFactory), | ||||||
| minNumHits = 10, | ||||||
| fileDir = 'HGalignment/', | ||||||
| pedeSteerer = dict( | ||||||
| pedeCommand = 'pede', | ||||||
| method = 'inversion 5 0.8', | ||||||
| options = cms.vstring( | ||||||
| #'regularisation 1.0 0.05', # non-stated pre-sigma 50 mrad or 500 mum | ||||||
| 'entries 500', | ||||||
| 'chisqcut 30.0 4.5', | ||||||
| 'threads 1 1', | ||||||
| 'closeandreopen', | ||||||
| 'skipemptycons' | ||||||
| #'outlierdownweighting 3','dwfractioncut 0.1' | ||||||
| #'outlierdownweighting 5','dwfractioncut 0.2' | ||||||
| ), | ||||||
| fileDir = 'HGalignment/', | ||||||
| runDir = cms.untracked.string('HGalignment/'), | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed at 1ac393c |
||||||
| steerFile = 'pedeSteerHG', | ||||||
| pedeDump = 'pedeHG.dump' | ||||||
| ), | ||||||
| pedeReader = dict( | ||||||
| fileDir = 'HGalignment/' | ||||||
| ), | ||||||
| MillePedeFileReader = dict( | ||||||
| fileDir = "HGalignment/", | ||||||
| isHG = True | ||||||
| ) | ||||||
| ) | ||||||
|
|
||||||
| SiPixelAliDQMModuleHG = SiPixelAliDQMModule.clone() | ||||||
| SiPixelAliDQMModuleHG.MillePedeFileReader.fileDir = "HGalignment/" | ||||||
| SiPixelAliDQMModuleHG.MillePedeFileReader.isHG = True | ||||||
|
|
||||||
| from DQMServices.Core.DQMEDHarvester import DQMEDHarvester | ||||||
| dqmEnvSiPixelAliHG = DQMEDHarvester('DQMHarvestingMetadata', | ||||||
| subSystemFolder = cms.untracked.string('AlCaReco'), | ||||||
| ) | ||||||
|
|
||||||
| ALCAHARVESTSiPixelAliHG = cms.Sequence(SiPixelAliMilleFileExtractorHG* | ||||||
| SiPixelAliPedeAlignmentProducerHG* | ||||||
| SiPixelAliDQMModuleHG* | ||||||
| dqmEnvSiPixelAliHG) | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import FWCore.ParameterSet.Config as cms | ||
|
|
||
| ## | ||
| ## Do not filter out the first 20 LS when | ||
| ## running the PCL alignment in the RelVal case | ||
| ## | ||
|
|
||
| def doNotFilterLS(process): | ||
| if hasattr(process,'lsNumberFilter'): | ||
| process.lsNumberFilter.minLS = 1 | ||
| return process | ||
|
|
||
| ## | ||
| ## Required 10 instead of 500 hits per structure | ||
| ## when running the HG PCL alignment in the RelVal case | ||
| ## | ||
|
|
||
| def lowerHitsPerStructure(process): | ||
| if hasattr(process,'SiPixelAliPedeAlignmentProducerHG'): | ||
| process.SiPixelAliPedeAlignmentProducerHG.algoConfig.pedeSteerer.options = cms.vstring( | ||
| 'entries 10', | ||
| 'chisqcut 30.0 4.5', | ||
| 'threads 1 1', | ||
| 'closeandreopen' | ||
| ) | ||
| return process |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,6 +47,7 @@ AlignmentProducerBase::AlignmentProducerBase(const edm::ParameterSet& config, ed | |
| saveDeformationsToDB_{config.getParameter<bool>("saveDeformationsToDB")}, | ||
| useSurvey_{config.getParameter<bool>("useSurvey")}, | ||
| enableAlignableUpdates_{config.getParameter<bool>("enableAlignableUpdates")}, | ||
| tkAliRcdName_{config.getParameter<std::string>("trackerAlignmentRcdName")}, | ||
| ttopoToken_(iC.esConsumes<edm::Transition::BeginRun>()), | ||
| geomDetToken_(iC.esConsumes<edm::Transition::BeginRun>()), | ||
| ptpToken_(iC.esConsumes<edm::Transition::BeginRun>()), | ||
|
|
@@ -854,7 +855,13 @@ void AlignmentProducerBase::writeForRunRange(cond::Time_t time) { | |
| auto alignments = alignableTracker_->alignments(); | ||
| auto alignmentErrors = alignableTracker_->alignmentErrors(); | ||
| this->writeDB( | ||
| alignments, "TrackerAlignmentRcd", alignmentErrors, "TrackerAlignmentErrorExtendedRcd", trackerGlobal, time); | ||
| // ~alignments, "TrackerAlignmentRcd", alignmentErrors, "TrackerAlignmentErrorExtendedRcd", trackerGlobal, time); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can this commented out and outdated line get removed?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed at 1ac393c |
||
| alignments, | ||
| tkAliRcdName_, | ||
| alignmentErrors, | ||
| "TrackerAlignmentErrorExtendedRcd", | ||
| trackerGlobal, | ||
| time); | ||
|
|
||
| // Save surface deformations to database | ||
| if (saveDeformationsToDB_) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed at 1ac393c