CMS 3D CMS Logo

ConfigureAlignmentProducer.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 def setConfiguration(process, collection, mode, monitorFile, binaryFile,
4  primaryWidth = 0.0, cosmicsZeroTesla = False):
5 
6 
9  process.load("Alignment.CommonAlignmentProducer.AlignmentProducerAsAnalyzer_cff")
10 
11  # Start geometry from db
12  process.AlignmentProducer.applyDbAlignment = True
13  process.AlignmentProducer.checkDbAlignmentValidity = False
14 
15  # What tracks are used to construct the reference trajectories?
16  process.AlignmentProducer.tjTkAssociationMapTag = "FinalTrackRefitter"
17 
18  # enable proper handling of multi-IOV input
19  process.AlignmentProducer.enableAlignableUpdates = True
20 
21  # Configure the algorithm
22  process.AlignmentProducer.algoConfig = cms.PSet(
23  process.MillePedeAlignmentAlgorithm)
24  process.AlignmentProducer.algoConfig.mode = mode
25  process.AlignmentProducer.algoConfig.mergeBinaryFiles = cms.vstring()
26  process.AlignmentProducer.algoConfig.skipGlobalPositionRcdCheck = True
27 
28  # default pede options:
29  process.AlignmentProducer.algoConfig.pedeSteerer.method = "sparseMINRES-QLP 3 0.8"
30  process.AlignmentProducer.algoConfig.minNumHits = 8
31  process.AlignmentProducer.algoConfig.pedeSteerer.options = [
32  "entries 50 10 2",
33  "outlierdownweighting 3",
34  "dwfractioncut 0.1",
35  "compress",
36  "threads 10 10",
37  "matiter 1",
38  "printcounts 2",
39  "chisqcut 30. 6.",
40  "bandwidth 6 1",
41  "monitorresiduals",
42  ]
43 
44  if mode == "mille":
45  process.AlignmentProducer.algoConfig.binaryFile = binaryFile
46  process.AlignmentProducer.algoConfig.monitorFile = monitorFile
47  elif "pede" in mode:
48  process.AlignmentProducer.algoConfig.binaryFile = ''
49  process.AlignmentProducer.algoConfig.monitorFile = 'millePedeMonitor_merge.root'
50  process.AlignmentProducer.algoConfig.treeFile = 'treeFile_merge.root'
51 
52 
53 
56 
57  if collection == "ALCARECOTkAlZMuMu" or collection == "ALCARECOTkAlZMuMuHI" or collection == "ALCARECOTkAlZMuMuPA":
58  process.AlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
59  process.TwoBodyDecayTrajectoryFactory
60  )
61  process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryMass = 91.1061
62  process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryWidth = 1.7678
63  process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = "LocalGBL"
64  # to account for multiple scattering in these layers
65  process.AlignmentProducer.algoConfig.TrajectoryFactory.UseInvalidHits = True
66  elif collection == "ALCARECOTkAlUpsilonMuMu":
67  process.AlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
68  process.TwoBodyDecayTrajectoryFactory
69  )
70  process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryMass = 9.4502
71  process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryWidth = 0.0644
72  process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = "LocalGBL"
73  # to account for multiple scattering in these layers
74  process.AlignmentProducer.algoConfig.TrajectoryFactory.UseInvalidHits = True
75  elif collection == "ALCARECOTkAlCosmicsCTF0T" and cosmicsZeroTesla:
76  process.AlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
77  process.BrokenLinesBzeroTrajectoryFactory
78  )
79  process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = "LocalGBL"
80  process.AlignmentProducer.algoConfig.TrajectoryFactory.MomentumEstimate = 5.0
81  else:
82  process.AlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
83  process.BrokenLinesTrajectoryFactory
84  )
85  process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = "LocalGBL"
86 
87 
88 
91 
92  if primaryWidth > 0.0:
93  process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryWidth = primaryWidth
94 
def setConfiguration(process, collection, mode, monitorFile, binaryFile, primaryWidth=0.0, cosmicsZeroTesla=False)