CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MillePedeAlignmentAlgorithm_cfi.py
Go to the documentation of this file.
1 # MillePedeAlignmentAlgorithm
2 # ---------------------------
3 
4 import FWCore.ParameterSet.Config as cms
5 
8 
9 MillePedeAlignmentAlgorithm = cms.PSet(
10  algoName = cms.string('MillePedeAlignmentAlgorithm'),
11  mode = cms.untracked.string('full'), ## possible modes: full, mille, pede, pedeSteer, pedeRun, pedeRead
12  fileDir = cms.untracked.string(''),
13 
14  # Where mille writes (and pede reads) derivatives, labels etc.
15  binaryFile = cms.string('milleBinary.dat'),
16  # Resulting and initial parameters, absolute (original) positions, result etc.
17  treeFile = cms.string('treeFile.root'),
18  # Must be empty if mille runs, otherwise for merging (pede) jobs should be parallel with each
19  # other. Then 'treeFile' is merged result and 'binaryFile' should be empty.
20  mergeBinaryFiles = cms.vstring(),
21  mergeTreeFiles = cms.vstring(),
22 
23  monitorFile = cms.untracked.string('millePedeMonitor.root'), ## if empty: no monitoring...
24 
25  runAtPCL = cms.bool(False), # at the PCL the mille binaries are reset at lumi-section boundaries
26  ignoreFirstIOVCheck = cms.untracked.bool(False), # flag to ignore check if data is prior to first IOV
27  ignoreHitsWithoutGlobalDerivatives = cms.bool(False), # - if all alignables and calibration for a
28  # hit are set to '0', the hit is ignored
29  # - has only an effect with non-GBL
30  # material-effects description
31  skipGlobalPositionRcdCheck = cms.bool(False), # since the change of the GlobalPositionRcd is
32  # mostly driven by changes of the muon system
33  # it is often safe to ignore this change for
34  # tracker alignment
35 
36  # PSet that allows to configure the pede labeler, i.e. select the actual
37  # labeler plugin to use and parameters for the selected plugin
38  pedeLabeler = cms.PSet(
39  #plugin = cms.string('MomentumDependentPedeLabeler')
40  #parameterInstances = cms.VPSet(
41  # cms.PSet(momentumRanges = cms.vstring('0.0:50.0','50.0:10000.0'),
42  # selector = cms.vstring('ExtrasBeamSpot,1111'))
43  # )
44  ),
45 
46  pedeSteerer = cms.PSet(
47  fileDir = cms.untracked.string(''),
48  steerFile = cms.string('pedeSteer'), ## beginning of steering file names
49  steerFileDebug = cms.untracked.bool(False),
50  # If MillePedeAlignmentAlgorithm.mode causes pede to run (e.g. 'full', 'pede' etc.),
51  # the pede command line is constructed as:
52  # 'pedeCommand' 'steerFile'Master.txt
53  # (and - if pedeDump is not empty - extended by: > 'pedeDump')
54  # (MillePedeAlignmentAlgorithm.theDir is taken into account...)
55  pedeCommand = cms.untracked.string('pede'),
56 
57  parameterSign = cms.untracked.int32(1), ## old pede versions (before May '07) need a sign flip
58  pedeDump = cms.untracked.string('pede.dump'),
59  method = cms.string('sparseMINRES 6 0.8'), ## "inversion 6 0.8"
60  options = cms.vstring('entries 50', # min. number of measurements (parameters with less will be skipped)
61  # 'regularisation 1.0 0.01', # regularisation with default pre-sigma 0.01
62  # "chisqcut 20.0 4.5", # simple chi^2 cut for outliers AND/OR ...
63  # "outlierdownweighting 3", "dwfractioncut 0.1" #, # ... 3x Huber down weighting OR...
64  'outlierdownweighting 5', 'dwfractioncut 0.2'),
65 
66  # Special selection of parameters to fix, use as reference coordinate system etc.
67  # ------------------------------------------------------------------------------
68  # All this is determined from what is given as
69  # AlignmentProducer.ParameterBuilder.Selector, cf. Twiki page SWGuideMillepedeIIAlgorithm.
70  Presigmas = cms.VPSet(),
71  minHieraConstrCoeff = cms.double(1.e-10), # min abs value of coeff. in hierarchy constr.
72  minHieraParPerConstr = cms.uint32(2), # ignore hierarchy constraints with less params
73  constrPrecision = cms.uint32(10), # precision for writing constraints to text file. Default is 6 and can be setup with constrPrecision = cms.uint32(0)
74  # specify additional steering files
75  additionalSteerFiles = cms.vstring(), # obsolete - can be given as entries in 'options'
76 
77  # Parameter vector for the systematic geometry deformations
78  # Empty vector -> constraints are NOT applied (default)
79  constraints = cms.VPSet()
80  ),
81 
82  pedeReader = cms.PSet(
83  readFile = cms.string('millepede.res'),
84  # directory of 'readFile', if empty:
85  # take from pedeSteerer (inheriting from MillePedeAlignmentAlgorithm)
86  fileDir = cms.untracked.string('')
87  ),
88 
89  # Array of PSet's like 'pedeReader' above to be applied before running mille,
90  # i.e. for iterative running of Millepede without going via DB constants
91  # (note: if 'fileDir' empty, the one from 'pedeSteerer' will be used...):
92  pedeReaderInputs = cms.VPSet(),
93 
94  TrajectoryFactory = BrokenLinesTrajectoryFactory, # from TrajectoryFactories
95  # BrokenLinesBzeroTrajectoryFactory
96  # TwoBodyDecayReferenceTrajectoryFactory, # for this overwrite MaterialEffects for BL
97  minNumHits = cms.uint32(7), ## minimum number of hits (with alignable parameters)
98  max2Dcorrelation = cms.double(0.05), ## if correlation >5% 2D measurements in TID/TEC get diagonalized
99  doubleBinary = cms.bool(False), ## create binary files with doubles instead of floats (GBL only)
100 
101  # Parameters for PXB survey steering
102  surveyPixelBarrel = cms.PSet(
103  doSurvey = cms.bool(False),
104  infile = cms.FileInPath("Alignment/SurveyAnalysis/data/BPix_Survey_info_raw.txt"),
105  doOutputOnStdout = cms.bool(False),
106  # Settings for toy survey - produces a file with toy survey data according to given parameters
107  doToySurvey = cms.bool(False),
108  toySurveyFile = cms.untracked.string('toySurveyInfo.txt'),
109  toySurveySeed = cms.uint32(12),
110  toySurveyParameters = cms.VPSet(
111  # Position of photo in local frame (unit: pixels in photo)
112  cms.PSet(name = cms.string('a0'), mean = cms.double(1800.), sigma = cms.double(150.)),
113  cms.PSet(name = cms.string('a1'), mean = cms.double(2600.), sigma = cms.double(200.)),
114  # Scale of photo (unit: pixels per cm)
115  cms.PSet(name = cms.string('scale'), mean = cms.double(1150.), sigma = cms.double(50.)),
116  # Rotation of photo in local frame (unit: rads)
117  cms.PSet(name = cms.string('phi'), mean = cms.double(0.), sigma = cms.double(0.0025)),
118  # Smearing of measurements in u and v coordinate (unit: pixels in photo)
119  cms.PSet(name = cms.string('u'), mean = cms.double(0.), sigma = cms.double(0.175)),
120  cms.PSet(name = cms.string('v'), mean = cms.double(0.), sigma = cms.double(0.175))
121  )
122  ),
123 
124  #parameters used to read the pede files back for DQM and check on parameters
125  MillePedeFileReader = cms.PSet(MillePedeFileReader),
126 )
127