CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/Alignment/MillePedeAlignmentAlgorithm/python/MillePedeAlignmentAlgorithm_cfi.py

Go to the documentation of this file.
00001 # MillePedeAlignmentAlgorithm
00002 # ---------------------------
00003 
00004 import FWCore.ParameterSet.Config as cms
00005 
00006 from Alignment.ReferenceTrajectories.TrajectoryFactories_cff import *
00007 
00008 MillePedeAlignmentAlgorithm = cms.PSet(
00009     algoName = cms.string('MillePedeAlignmentAlgorithm'),
00010     mode = cms.untracked.string('full'), ## possible modes: full, mille, pede, pedeSteer, pedeRun, pedeRead
00011     fileDir = cms.untracked.string(''),
00012 
00013     # Where mille writes (and pede reads) derivatives, labels etc.
00014     binaryFile = cms.string('milleBinary.dat'),
00015     # Resulting and initial parameters, absolute (original) positions, result etc.
00016     treeFile = cms.string('treeFile.root'),
00017     # Must be empty if mille runs, otherwise for merging (pede) jobs should be parallel with each
00018     # other. Then 'treeFile' is merged result and 'binaryFile' should be empty.
00019     mergeBinaryFiles = cms.vstring(),
00020     mergeTreeFiles = cms.vstring(),
00021 
00022     monitorFile = cms.untracked.string('millePedeMonitor.root'), ## if empty: no monitoring...
00023 
00024     # PSet that allows to configure the pede labeler, i.e. select the actual
00025     # labeler plugin to use and parameters for the selected plugin
00026     pedeLabeler = cms.PSet(
00027       #plugin = cms.string('MomentumDependentPedeLabeler')
00028       #parameterInstances = cms.VPSet(
00029       #  cms.PSet(momentumRanges = cms.vstring('0.0:50.0','50.0:10000.0'),
00030       #           selector = cms.vstring('ExtrasBeamSpot,1111'))
00031       #  )
00032     ),
00033     
00034     pedeSteerer = cms.PSet(
00035         fileDir = cms.untracked.string(''),
00036         steerFile = cms.string('pedeSteer'), ## beginning of steering file names
00037         steerFileDebug = cms.untracked.bool(False),
00038         # If MillePedeAlignmentAlgorithm.mode causes pede to run (e.g. 'full', 'pede' etc.),
00039         # the pede command line is constructed as:
00040         #    'pedeCommand' 'steerFile'Master.txt 
00041         # (and - if pedeDump is not empty - extended by: > 'pedeDump')
00042         # (MillePedeAlignmentAlgorithm.theDir is taken into account...)
00043         pedeCommand = cms.untracked.string('pede_1GB'),
00044 
00045         parameterSign = cms.untracked.int32(1), ## old pede versions (before May '07) need a sign flip
00046         pedeDump = cms.untracked.string('pede.dump'),
00047         method = cms.string('sparseMINRES 6  0.8'), ## "inversion  6  0.8" 
00048         options = cms.vstring('entries 50', # min. number of measurements (parameters with less will be skipped)
00049             # 'regularisation 1.0 0.01', # regularisation with default pre-sigma 0.01
00050             # "chisqcut  20.0  4.5", # simple chi^2 cut for outliers AND/OR ...
00051             # "outlierdownweighting 3", "dwfractioncut 0.1" #, # ... 3x Huber down weighting OR...
00052             'outlierdownweighting 5', 'dwfractioncut 0.2'),
00053 
00054         # Special selection of parameters to fix, use as reference coordinate system etc.
00055         # ------------------------------------------------------------------------------
00056         # All this is determined from what is given as 
00057         # AlignmentProducer.ParameterBuilder.Selector, cf. Twiki page SWGuideMillepedeIIAlgorithm.
00058         Presigmas = cms.VPSet(),
00059         minHieraConstrCoeff = cms.double(1.e-7), # min abs value of coeff. in hierarchy constr.
00060         minHieraParPerConstr = cms.uint32(2), # ignore hierarchy constraints with less params
00061 
00062         # specify additional steering files
00063         additionalSteerFiles = cms.vstring() # obsolete - can be given as entries in 'options'
00064     ),
00065 
00066     pedeReader = cms.PSet(
00067         readFile = cms.string('millepede.res'),
00068         # directory of 'readFile', if empty:
00069         # take from pedeSteerer (inheriting from MillePedeAlignmentAlgorithm)
00070         fileDir = cms.untracked.string('')
00071     ),
00072 
00073     # Array of PSet's like 'pedeReader' above to be applied before running mille,
00074     # i.e. for iterative running of Millepede without going via DB constants
00075     # (note: if 'fileDir' empty, the one from 'pedeSteerer' will be used...): 
00076     pedeReaderInputs = cms.VPSet(),
00077 
00078     TrajectoryFactory = BrokenLinesTrajectoryFactory,  # from TrajectoryFactories
00079         # BrokenLinesBzeroTrajectoryFactory
00080         # TwoBodyDecayReferenceTrajectoryFactory, # for this overwrite MaterialEffects for BL
00081     minNumHits = cms.uint32(7), ## minimum number of hits (with alignable parameters)
00082     max2Dcorrelation = cms.double(0.05), ## if correlation >5% 2D measurements in TID/TEC get diagonalized
00083 
00084         # Parameters for PXB survey steering
00085     surveyPixelBarrel = cms.PSet(
00086                         doSurvey = cms.bool(False),
00087                         infile = cms.FileInPath("Alignment/SurveyAnalysis/data/BPix_Survey_info_raw.txt"),
00088                         doOutputOnStdout = cms.bool(False),
00089                         # Settings for toy survey - produces a file with toy survey data according to given parameters
00090                         doToySurvey = cms.bool(False),
00091                         toySurveyFile = cms.untracked.string('toySurveyInfo.txt'),
00092                         toySurveySeed = cms.uint32(12),
00093                         toySurveyParameters = cms.VPSet(
00094                                         # Position of photo in local frame (unit: pixels in photo)
00095                                         cms.PSet(name = cms.string('a0'),    mean = cms.double(1800.), sigma = cms.double(150.)),
00096                                         cms.PSet(name = cms.string('a1'),    mean = cms.double(2600.), sigma = cms.double(200.)),
00097                                         # Scale of photo (unit: pixels per cm)
00098                                         cms.PSet(name = cms.string('scale'), mean = cms.double(1150.), sigma = cms.double(50.)),
00099                                         # Rotation of photo in local frame (unit: rads)
00100                                         cms.PSet(name = cms.string('phi'),   mean = cms.double(0.), sigma = cms.double(0.0025)),
00101                                         # Smearing of measurements in u and v coordinate (unit: pixels in photo)
00102                                         cms.PSet(name = cms.string('u'),     mean = cms.double(0.), sigma = cms.double(0.175)),
00103                                         cms.PSet(name = cms.string('v'),     mean = cms.double(0.), sigma = cms.double(0.175))
00104                                         )
00105         )
00106 )
00107