Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:58:34

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from Configuration.StandardSequences.Eras import eras
0004 process = cms.Process("trackBasedAlignment", eras.Run2_2018)
0005 
0006 # minimum of logs
0007 process.MessageLogger = cms.Service("MessageLogger",
0008   statistics = cms.untracked.vstring(),
0009   destinations = cms.untracked.vstring('cout'),
0010   cout = cms.untracked.PSet(
0011     threshold = cms.untracked.string('WARNING')
0012   )
0013 )
0014 
0015 # input data
0016 process.source = cms.Source("PoolSource",
0017     skipBadFiles = cms.untracked.bool(True),
0018     fileNames = cms.untracked.vstring(
0019 $inputFiles
0020     ),
0021     lumisToProcess = cms.untracked.VLuminosityBlockRange($lsList),
0022     inputCommands = cms.untracked.vstring(
0023       "drop *",
0024       "keep TotemRPRecHitedmDetSetVector_*_*_*",
0025       "keep CTPPSPixelRecHitedmDetSetVector_*_*_*",
0026     )
0027 )
0028 
0029 # geometry
0030 process.load("Geometry.VeryForwardGeometry.geometryRPFromDD_2018_cfi")
0031 del(process.XMLIdealGeometryESSource_CTPPS.geomXMLFiles[-1])
0032 process.XMLIdealGeometryESSource_CTPPS.geomXMLFiles.append("$geometry/RP_Dist_Beam_Cent.xml")
0033 
0034 # initial alignments
0035 process.load("CalibPPS.ESProducers.ctppsRPAlignmentCorrectionsDataESSourceXML_cfi")
0036 process.ctppsRPAlignmentCorrectionsDataESSourceXML.RealFiles = cms.vstring($alignmentFiles)
0037 
0038 # reco modules
0039 process.load("RecoPPS.Local.totemRPLocalReconstruction_cff")
0040 
0041 process.load("RecoPPS.Local.ctppsPixelLocalReconstruction_cff")
0042 
0043 process.load("RecoPPS.Local.ctppsLocalTrackLiteProducer_cff")
0044 process.ctppsLocalTrackLiteProducer.includeDiamonds = False
0045 
0046 # aligner
0047 process.load("CalibPPS.AlignmentRelative.ppsStraightTrackAligner_cfi")
0048 
0049 process.ppsStraightTrackAligner.verbosity = 1
0050 
0051 process.ppsStraightTrackAligner.tagUVPatternsStrip = cms.InputTag("totemRPUVPatternFinder")
0052 process.ppsStraightTrackAligner.tagDiamondHits = cms.InputTag("")
0053 process.ppsStraightTrackAligner.tagPixelHits = cms.InputTag("")
0054 process.ppsStraightTrackAligner.tagPixelLocalTracks = cms.InputTag("ctppsPixelLocalTracks")
0055 
0056 process.ppsStraightTrackAligner.maxEvents = int($maxEvents)
0057 
0058 process.ppsStraightTrackAligner.rpIds = [$rps]
0059 process.ppsStraightTrackAligner.excludePlanes = cms.vuint32($excludePlanes)
0060 process.ppsStraightTrackAligner.z0 = $z0
0061 
0062 process.ppsStraightTrackAligner.maxResidualToSigma = $maxResidualToSigma
0063 process.ppsStraightTrackAligner.minimumHitsPerProjectionPerRP = $minimumHitsPerProjectionPerRP
0064 
0065 process.ppsStraightTrackAligner.removeImpossible = True
0066 process.ppsStraightTrackAligner.requireNumberOfUnits = $requireNumberOfUnits
0067 process.ppsStraightTrackAligner.requireOverlap = $requireOverlap
0068 process.ppsStraightTrackAligner.requireAtLeast3PotsInOverlap = $requireAtLeast3PotsInOverlap
0069 process.ppsStraightTrackAligner.additionalAcceptedRPSets = "$additionalAcceptedRPSets"
0070 
0071 process.ppsStraightTrackAligner.cutOnChiSqPerNdf = True
0072 process.ppsStraightTrackAligner.chiSqPerNdfCut = $chiSqPerNdfCut
0073 
0074 process.ppsStraightTrackAligner.maxTrackAx = $maxTrackAx
0075 process.ppsStraightTrackAligner.maxTrackAy = $maxTrackAy
0076 
0077 optimize="$optimize"
0078 process.ppsStraightTrackAligner.resolveShR = $resolveShR
0079 process.ppsStraightTrackAligner.resolveShZ = False
0080 process.ppsStraightTrackAligner.resolveRotZ = $resolveRotZ
0081 
0082 process.ppsStraightTrackAligner.constraintsType = "standard"
0083 process.ppsStraightTrackAligner.standardConstraints.units = cms.vuint32($final_constraints_units)
0084 process.ppsStraightTrackAligner.oneRotZPerPot = $oneRotZPerPot
0085 process.ppsStraightTrackAligner.useEqualMeanUMeanVRotZConstraints = $useEqualMeanUMeanVRotZConstraints
0086 
0087 process.ppsStraightTrackAligner.algorithms = cms.vstring("Jan")
0088 
0089 process.ppsStraightTrackAligner.JanAlignmentAlgorithm.stopOnSingularModes = False
0090 
0091 results_dir="$results_dir"
0092 
0093 process.ppsStraightTrackAligner.taskDataFileName = "" # results_dir + "/task_data.root"
0094 
0095 process.ppsStraightTrackAligner.fileNamePrefix = results_dir + "/results_iteration_"
0096 process.ppsStraightTrackAligner.expandedFileNamePrefix = results_dir + "/results_cumulative_expanded_"
0097 process.ppsStraightTrackAligner.factoredFileNamePrefix = results_dir + "/results_cumulative_factored_"
0098 
0099 process.ppsStraightTrackAligner.diagnosticsFile = results_dir + '/diagnostics.root'
0100 process.ppsStraightTrackAligner.buildDiagnosticPlots = $buildDiagnosticPlots
0101 process.ppsStraightTrackAligner.JanAlignmentAlgorithm.buildDiagnosticPlots = $buildDiagnosticPlots
0102 
0103 # processing sequence
0104 process.p = cms.Path(
0105   # it is important to re-run part of the reconstruction as it may influence
0106   # the choice of rec-hits used in the alignment
0107   process.totemRPUVPatternFinder
0108   * process.totemRPLocalTrackFitter
0109   * process.ctppsPixelLocalTracks
0110   * process.ctppsLocalTrackLiteProducer
0111 
0112   * process.ppsStraightTrackAligner
0113 )